/* sun-data.css */

/* Location Bar */
.location-bar {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    align-items: center;
}

.loc-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.loc-icon {
    position: absolute;
    left: 1rem;
    font-size: 1.2rem;
    pointer-events: none;
}

.location-bar input {
    width: 100%;
    background: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 12px;
    padding: 1rem 1rem 1rem 3rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

body.light-mode .location-bar input {
    background: rgba(255,255,255,0.5);
    border: 1px solid rgba(0,0,0,0.1);
}

.location-bar input:focus {
    border-color: var(--accent-color);
}

.gps-btn {
    height: 52px; /* Match input height */
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sky Visualizer Panel */
.sky-visualizer {
    padding: 2rem;
    margin-bottom: 2rem;
    height: 550px;
    text-align: center;
    border-radius: 20px;
    z-index: 1;
    position: relative;
    /* Removed overflow:hidden to ensure shadows/glows aren't clipped if close to edge */
}

.sky-header {
    margin-bottom: 1.5rem;
}

.sky-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.2rem;
    color: var(--text-primary);
}

.temp-display {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.weather-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.weather-icon { font-size: 1.5rem; }
.weather-desc { font-size: 1rem; color: var(--text-secondary); font-weight: 500; }

/* 
   ROBUST CIRCLE ARCHITECTURE (FULL 360)
   Container: 300px wide, 300px high.
   Center point is at 50% 50%.
*/
.visualizer-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto; /* Centered with spacing */
    box-sizing: border-box;
}

/* The Full Circle Arc */
.sky-arc-line {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px dashed rgba(255,255,255,0.3);
    position: absolute;
    top: 0;
    left: 0;
    box-sizing: border-box;
    z-index: 1;
}

body.light-mode .sky-arc-line {
    border-color: rgba(0,0,0,0.2);
}

/* The Horizon Line (Splits the circle horizontally) */
.sky-horizon-line {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    height: 2px;
    background: rgba(255,255,255,0.4);
    z-index: 2;
    transform: translateY(-50%);
}

body.light-mode .sky-horizon-line {
    background: rgba(0,0,0,0.3);
}

/* 
   THE ROTATING ARMS
   Pivot Point: Center of the container (bottom of the arm).
   Arm extends upwards from center to edge (radius).
*/
.celestial-arm {
    position: absolute;
    bottom: 50%; /* Starts at vertical center */
    left: 50%;   /* Horizontal center */
    width: 0; 
    height: 150px; /* Radius = 150px (half of 300px) */
    background: transparent;
    transform-origin: bottom center; /* Rotate around the center point */
    transition: transform 1s linear;
    z-index: 10;
    transform: rotate(-90deg); /* Default start pos */
}

/* The Icon at the TIP of the arm */
.celestial-icon {
    position: absolute;
    top: 0; 
    left: 0;
    width: 40px;
    height: 40px;
    margin-left: -20px; 
    margin-top: -20px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1; 
    z-index: 999;
}

/* Sun Glow */
.sun-icon { 
    font-size: 2.2rem;
    text-shadow: 0 0 15px rgba(255, 215, 0, 0.8);
}

/* Moon Glow */
.moon-icon { 
    font-size: 1.8rem;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

/* Labels below chart */
.chart-labels {
    display: flex;
    justify-content: space-between;
    width: 340px; 
    margin: -160px auto 140px auto; /* Pull up to sit on horizon line */
    font-size: 0.8rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 5;
    pointer-events: none;
}

.day-length {
    margin-top: 1rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Data Split */
.data-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.data-card {
    padding: 1.5rem;
    border-radius: 20px;
}

.data-card h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 0.5rem;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.data-row.sm {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-row .value {
    font-weight: 600;
    color: var(--text-primary);
    font-feature-settings: "tnum";
}

.divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 1rem 0;
}

.data-card h4 {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 0.8rem;
}

/* Moon Specifics */
.moon-phase-display {
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
}

.phase-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.2);
}

.phase-name {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
}

.phase-detail {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.api-credit {
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Responsive */
@media (max-width: 768px) {
    .data-split { grid-template-columns: 1fr; }
    .location-bar { flex-direction: column; }
    .loc-input-wrapper { width: 100%; }
    .gps-btn { width: 100%; justify-content: center; }
}
