/* tools/golden-hour.css
   Golden hour planner: a place/date card (the shared .tool-settings look),
   the day's times as tiles, a 24-hour light timeline, and the week ahead.
   Band colours: night near-black blue, blue hour, golden amber, daylight
   pale sky. Gold appears only where it means golden hour. */

.tool-content.gh-page {
    grid-template-rows: auto;
    --gh-night: #141b2e;
    --gh-blue: #3557b7;
    --gh-golden: #f2a93b;
    --gh-day: #a9cdf0;
}

.gh-page .tool-settings {
    max-width: none;
    margin: 0;
}

.gh-controls-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 18px 24px;
    align-items: start;
}

.gh-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.gh-page input[type="search"],
.gh-page input[type="text"],
.gh-page input[type="date"] {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    color-scheme: dark;
    min-width: 0;
}

.gh-page input::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

.gh-page input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.55);
    background: rgba(255, 255, 255, 0.09);
}

.gh-page input:disabled {
    opacity: 0.6;
}

.gh-search-wrap {
    position: relative;
}

.gh-results {
    position: absolute;
    z-index: 30;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #1d1c22;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
    max-height: 320px;
    overflow-y: auto;
}

.gh-results[hidden] {
    display: none;
}

.gh-results li {
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 9px 12px;
    border-radius: 9px;
    cursor: pointer;
}

.gh-results li.is-active,
.gh-results li[role="option"]:hover {
    background: rgba(255, 255, 255, 0.09);
}

.gh-opt-name {
    color: #fff;
    font-size: 0.95rem;
}

.gh-opt-sub {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.78rem;
}

.gh-results .gh-none {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.85rem;
    cursor: default;
}

.gh-where-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
    align-items: center;
}

.gh-coords {
    display: flex;
    gap: 8px;
    flex: 1;
    min-width: 240px;
}

.gh-coords input {
    flex: 1;
    font-size: 0.9rem !important;
}

.gh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    padding: 9px 15px;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.gh-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.55);
}

.gh-btn[hidden] {
    display: none;
}

.gh-btn:disabled {
    opacity: 0.5;
    cursor: default;
}

.gh-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.gh-icon-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    font-size: 1.4rem;
    line-height: 1;
    flex: none;
}

.gh-date-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.gh-date-row input {
    flex: 1;
}

.gh-note {
    margin: 8px 0 0;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.gh-note:empty {
    display: none;
}

/* The day */
.gh-result {
    background: var(--tile-fill);
    border: 1px solid var(--tile-border);
    border-radius: var(--tile-radius);
    padding: 20px;
    min-width: 0;
}

.gh-result-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
}

.gh-result-title {
    min-width: 0;
}

.gh-result-title h2 {
    margin: 0 0 4px;
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: #fff;
}

.gh-place-sub {
    margin: 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.5;
}

.gh-share {
    flex: none;
}

.gh-status {
    margin: 0 0 12px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
}

.gh-status:empty {
    display: none;
}

.gh-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.gh-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 14px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 3px solid var(--gh-c, rgba(255, 255, 255, 0.3));
    min-width: 0;
}

.gh-card--golden {
    --gh-c: var(--gh-golden);
    background: rgba(242, 169, 59, 0.08);
}

.gh-card--blue {
    --gh-c: #6f8fe8;
}

.gh-card--sun {
    --gh-c: var(--gh-day);
}

.gh-card--night {
    --gh-c: #4a5372;
}

.gh-card-title {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.gh-card-main {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.gh-card--golden .gh-card-main {
    color: #ffd38a;
}

.gh-card-sub,
.gh-card-note {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.55);
}

/* Timeline */
.gh-timeline-wrap {
    margin-top: 22px;
}

.gh-timeline {
    position: relative;
    height: 34px;
    border-radius: 10px;
    overflow: visible;
    background: var(--gh-night);
}

.gh-seg {
    position: absolute;
    top: 0;
    bottom: 0;
}

.gh-seg.is-first {
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
}

.gh-seg.is-last {
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
}

.gh-seg--night { background: var(--gh-night); }
.gh-seg--blue { background: var(--gh-blue); }
.gh-seg--golden { background: var(--gh-golden); }
.gh-seg--day { background: var(--gh-day); }

.gh-mark {
    position: absolute;
    top: -4px;
    bottom: -4px;
    width: 2px;
    margin-left: -1px;
    background: #fff;
    border-radius: 1px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.gh-now {
    position: absolute;
    top: -8px;
    bottom: -8px;
    width: 0;
    border-left: 2px dashed #ff5d73;
    margin-left: -1px;
}

.gh-now span {
    position: absolute;
    top: -20px;
    left: 0;
    transform: translateX(-50%);
    font-size: 0.7rem;
    font-weight: 600;
    color: #ff8a9a;
    white-space: nowrap;
}

.gh-axis {
    position: relative;
    height: 20px;
    margin-top: 6px;
}

.gh-axis span {
    position: absolute;
    transform: translateX(-50%);
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
}

.gh-axis span:first-child {
    transform: none;
}

.gh-axis span:last-child {
    transform: translateX(-100%);
}

.gh-key {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 8px 0 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.65);
}

.gh-key span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gh-key-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Week */
.gh-week-wrap {
    background: var(--tile-fill);
    border: 1px solid var(--tile-border);
    border-radius: var(--tile-radius);
    padding: 18px 20px;
    min-width: 0;
}

.gh-small-title {
    margin: 0 0 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-secondary);
}

.gh-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gh-week-table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
    font-size: 0.92rem;
}

.gh-week-table th,
.gh-week-table td {
    text-align: left;
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    white-space: nowrap;
}

.gh-week-table thead th {
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
}

.gh-week-table tbody th {
    font-weight: 500;
    color: #fff;
}

.gh-week-table tbody tr:last-child th,
.gh-week-table tbody tr:last-child td {
    border-bottom: 0;
}

.gh-week-table tr.is-selected th,
.gh-week-table tr.is-selected td {
    background: rgba(255, 255, 255, 0.05);
}

.gh-w-golden {
    color: #ffd38a;
}

.gh-w-sun {
    color: rgba(255, 255, 255, 0.8);
}

.gh-credit {
    margin: 14px 0 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}

.gh-credit a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: underline;
    text-decoration-color: rgba(255, 255, 255, 0.35);
    text-underline-offset: 2px;
}

@media (max-width: 900px) {
    .gh-controls-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .gh-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gh-result,
    .gh-week-wrap {
        padding: 16px 14px;
    }

    .gh-result-head {
        flex-direction: column;
    }

    .gh-coords {
        min-width: 0;
        flex-basis: 100%;
    }

    .gh-where-row > .gh-btn {
        flex: 1;
    }

    .gh-card {
        padding: 12px;
    }

    .gh-card-main {
        font-size: 0.92rem;
        letter-spacing: -0.01em;
    }

    .gh-week-table {
        font-size: 0.82rem;
    }

    .gh-week-table th,
    .gh-week-table td {
        padding: 9px 6px;
    }

    .gh-axis span:nth-child(2),
    .gh-axis span:nth-child(4) {
        display: none;
    }
}

/* culler.css puts a direct .tool-settings child in the album's card slot
   (two columns, rows 2-3); here the place/date card is a full-width row. */
.tool-content.gh-page > .tool-settings {
    grid-column: 1 / -1;
    grid-row: auto;
    display: block;
}

/* 390 px phones: keep "6:23 am – 6:32 am" on one line in a half-width tile. */
@media (max-width: 400px) {
    .gh-cards {
        gap: 8px;
    }

    .gh-card {
        padding: 10px 9px 10px 10px;
    }

    .gh-card-main {
        font-size: 0.86rem;
    }
}
