/* ── Natal Chart Plugin ── */

#natalchart-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    font-family: sans-serif;
    color: #555;
    line-height: 1.7;
}

/* ── Headline (shared rrd-headline pattern) ── */
.rrd-headline {
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.rrd-headline-category {
    font-size: 0.75rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666666;
    margin-bottom: 1.2rem;
    font-family: sans-serif;
}

.rrd-headline-title {
    font-family: Georgia, serif;
    font-size: 51.2px;
    font-weight: 700;
    color: #666666;
    line-height: 1.05;
    margin-bottom: 1.25rem;
}

.rrd-headline-title em {
    font-size: 51.2px;
    font-style: italic;
    font-weight: 700;
    color: #666666;
    display: block;
}

.rrd-headline-subtitle p {
    font-family: Georgia, serif;
    font-size: 1.15rem;
    font-style: italic;
    font-weight: 400;
    color: #666666;
    line-height: 1.7;
    margin: 0 0 1.5rem;
}

/* ── Form ── */
.nat-form {
    background: #fafbff;
    border: 1px solid #e8edf8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.nat-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.nat-field {
    display: flex;
    flex-direction: column;
}

.nat-field-label {
    font-family: Georgia, serif;
    font-size: 1rem;
    font-style: italic;
    color: #666;
    margin: 0 0 0.5rem;
}

.nat-location-heading {
    margin-bottom: 0.75rem;
}

.nat-input {
    width: 100%;
    height: 44px;
    padding: 0 0.9rem;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    background: #fff;
    color: #444;
    font-size: 0.95rem;
    font-family: sans-serif;
    line-height: 1.4;
    transition: border-color 0.15s, background 0.15s;
}

.nat-input:focus {
    outline: none;
    border-color: #4169A8;
    background: #fafbff;
}

select.nat-input {
    cursor: pointer;
}

textarea.nat-input,
.nat-coord-grid .nat-input {
    height: 44px;
}

/* "Time unknown" checkbox underneath the time input */
.nat-time-unknown {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
    font-family: sans-serif;
    cursor: pointer;
}

.nat-time-unknown input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    accent-color: #4169A8;
}

.nat-input:disabled {
    background: #f0f2f7;
    color: #999;
    cursor: not-allowed;
}

/* ── Location modes ── */
.nat-location-row {
    margin-bottom: 0.75rem;
}

.nat-modes {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nat-mode-btn {
    padding: 0.55rem 1rem;
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    background: #fff;
    color: #555;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 0.85rem;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.nat-mode-btn:hover {
    border-color: #4169A8;
    background: #fafbff;
}

.nat-mode-btn--active {
    border-color: #4169A8;
    border-width: 2px;
    background: #f5f7fb;
    color: #4169A8;
    font-weight: 600;
    padding: calc(0.55rem - 1px) calc(1rem - 1px);
}

.nat-mode-pane {
    margin-bottom: 1rem;
}

.nat-coord-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
}

/* ── GeoNames search results ── */
.nat-geo-status {
    margin-top: 0.5rem;
}

.nat-geo-help {
    background: #fdf6e8;
    border: 1px solid #e0c870;
    color: #a07820;
    padding: 0.7rem 0.9rem;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.55;
    margin-top: 0.5rem;
}

.nat-geo-help a {
    color: #8a6020;
    text-decoration: underline;
}

.nat-loading {
    color: #888;
    font-size: 0.82rem;
    font-style: italic;
    font-family: Georgia, serif;
    margin-top: 0.5rem;
}

.nat-error {
    color: #b94a48;
    font-size: 0.82rem;
    font-family: sans-serif;
    margin-top: 0.5rem;
}

.nat-geo-output {
    margin-top: 0.5rem;
}

.nat-geo-results {
    border: 1px solid #d0d8e8;
    border-radius: 6px;
    max-height: 280px;
    overflow-y: auto;
    background: #fff;
}

.nat-geo-result {
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e8edf8;
    padding: 0.7rem 0.9rem;
    cursor: pointer;
    font-family: sans-serif;
    transition: background 0.1s;
}

.nat-geo-result:last-child { border-bottom: 0; }
.nat-geo-result:hover,
.nat-geo-result:focus {
    background: #f5f7fb;
    outline: none;
}

.nat-geo-result-name {
    display: block;
    color: #444;
    font-size: 0.9rem;
}

.nat-geo-result-meta {
    display: block;
    color: #888;
    font-size: 0.75rem;
    margin-top: 0.15rem;
}

.nat-geo-selected {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    background: #f5f7fb;
    border: 1px solid #d0dcf0;
    border-radius: 6px;
    padding: 0.75rem 0.9rem;
}

.nat-geo-selected-name {
    color: #4169A8;
    font-weight: 600;
    font-size: 0.92rem;
    font-family: sans-serif;
}

.nat-geo-selected-meta {
    color: #666;
    font-size: 0.78rem;
    margin-top: 0.2rem;
    font-family: sans-serif;
}

.nat-geo-change {
    background: transparent;
    border: 0;
    color: #4169A8;
    cursor: pointer;
    font-size: 0.8rem;
    text-decoration: underline;
    font-family: sans-serif;
    padding: 0;
    flex-shrink: 0;
}
.nat-geo-change:hover { color: #305090; }

.nat-dst {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    margin-top: 0.6rem;
    font-size: 0.85rem;
    color: #666;
    font-family: sans-serif;
    cursor: pointer;
    line-height: 1.5;
}

.nat-dst input { margin-top: 0.2rem; flex-shrink: 0; accent-color: #4169A8; }
.nat-dst-note {
    display: block;
    font-style: italic;
    color: #888;
    font-size: 0.78rem;
    margin-top: 0.15rem;
}

/* ── Submit row + legend ── */
.nat-deal-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.nat-btn {
    height: 44px;
    padding: 0 1.75rem;
    background: #4169A8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    letter-spacing: 0.03em;
    transition: background 0.15s;
    font-family: sans-serif;
    flex-shrink: 0;
}
.nat-btn:hover    { background: #305090; }
.nat-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.nat-legend {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.nat-legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #666;
    font-family: sans-serif;
}

.nat-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nat-legend-dot--sun { background: #4169A8; }
.nat-legend-dot--key { background: #d4a857; }

/* ── Time-unknown warning banner ── */
.nat-warning {
    background: #fdf6e8;
    border-left: 4px solid #d4a857;
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.2rem;
    margin-bottom: 1.5rem;
    font-size: 0.88rem;
    color: #6f5520;
    line-height: 1.6;
    font-family: sans-serif;
}

.nat-warning strong {
    color: #4169A8;
    font-weight: 600;
}

/* ── Results section ── */
.nat-results {
    animation: nat-fade-in 0.4s ease;
}
@keyframes nat-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Big Three cards */
.nat-bigthree {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.nat-bigthree-card {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(65, 105, 168, 0.05);
}

.nat-bigthree-glyph {
    font-size: 1.75rem;
    color: #4169A8;
    line-height: 1;
    margin-bottom: 0.4rem;
}

.nat-bigthree-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #4169A8;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-family: sans-serif;
}

.nat-bigthree-sign {
    font-family: Georgia, serif;
    font-size: 1.6rem;
    font-style: italic;
    color: #444;
    line-height: 1.15;
    margin-bottom: 0.4rem;
}

.nat-bigthree-desc {
    font-size: 0.78rem;
    color: #888;
    font-family: sans-serif;
}

.nat-bigthree-card--unreliable .nat-bigthree-sign {
    color: #999;
    text-decoration: line-through;
    text-decoration-color: rgba(212, 168, 87, 0.6);
}

.nat-bigthree-card--unreliable .nat-bigthree-desc {
    color: #b08540;
    font-style: italic;
}

/* Wheel card */
.nat-wheel-card {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(65, 105, 168, 0.05);
}

.nat-wheel-card svg {
    display: block;
    margin: 0 auto;
    width: 100%;
    max-width: 560px;
    height: auto;
}

/* Reading panel */
.nat-readings {
    background: #fff;
    border-left: 4px solid #4169A8;
    border-top: 1px solid #e8edf8;
    border-right: 1px solid #e8edf8;
    border-bottom: 1px solid #e8edf8;
    border-radius: 0 10px 10px 0;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.nat-readings-h2 {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: 700;
    color: #444;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e8edf8;
}

.nat-readings-section {
    padding: 0.85rem 0;
    border-bottom: 1px solid #e8edf8;
}
.nat-readings-section:first-of-type { padding-top: 0; }
.nat-readings-section:last-child    { border-bottom: 0; padding-bottom: 0; }

.nat-readings-h3 {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: #444;
    margin: 0 0 0.5rem;
}

.nat-readings-h3-tag {
    color: #888;
    font-size: 0.85rem;
    font-style: normal;
    font-weight: 400;
}

.nat-readings p {
    font-family: Georgia, serif;
    color: #555;
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
}

.nat-readings-minor {
    font-family: sans-serif !important;
    font-size: 0.88rem !important;
    color: #666 !important;
    line-height: 1.65;
    margin: 0.4rem 0 !important;
}

.nat-readings-minor strong {
    color: #4169A8;
    font-weight: 600;
}

/* Placements table */
.nat-table {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(65, 105, 168, 0.05);
}

.nat-table h3,
.nat-aspects h3 {
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 1.15rem;
    color: #444;
    margin: 0 0 0.85rem;
    font-weight: 700;
}

.nat-table-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 1.5rem;
    font-size: 0.9rem;
    font-family: sans-serif;
}

.nat-table-row {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #e8edf8;
    padding: 0.45rem 0;
}

.nat-table-name { color: #666; }
.nat-table-name-glyph {
    color: #4169A8;
    margin-right: 0.4rem;
    font-weight: 600;
}
.nat-table-pos {
    color: #444;
    font-variant-numeric: tabular-nums;
}

/* Aspects */
.nat-aspects {
    background: #fff;
    border: 1px solid #e8edf8;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(65, 105, 168, 0.05);
}

.nat-aspects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0 1.5rem;
    font-size: 0.85rem;
    font-family: sans-serif;
}

.nat-aspect {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e8edf8;
    color: #555;
}

.nat-aspect-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.nat-aspect-type {
    color: #888;
    font-style: italic;
    margin: 0 0.15em;
}

.nat-aspect-orb {
    margin-left: auto;
    color: #888;
    font-size: 0.75rem;
}

/* ── Lore grid (shared pattern) ── */
.nat-lore {
    border-top: 1px solid #e8edf8;
    padding-top: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
    margin-bottom: 2rem;
}

.nat-lore-block strong {
    display: block;
    font-family: Georgia, serif;
    font-size: 0.95rem;
    font-weight: 700;
    color: #444;
    margin-bottom: 0.4rem;
}

.nat-lore-block p {
    font-size: 0.88rem;
    color: #666;
    line-height: 1.7;
    margin: 0;
    font-family: sans-serif;
}

/* ── CTA Strip (shared pattern) ── */
.nat-cta-strip {
    border-left: 4px solid #4169A8;
    border-radius: 0 8px 8px 0;
    background: #f5f7fb;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.nat-cta-main {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid #e8edf8;
}

.nat-cta-main p {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

.nat-cta-main a {
    color: #4169A8;
    text-decoration: none;
    font-weight: 500;
}

.nat-cta-main a:hover { text-decoration: underline; }

.nat-cta-free {
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.nat-free-badge {
    background: #4169A8;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.3rem 0.75rem;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: sans-serif;
}

.nat-free-text {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    flex: 1;
    margin: 0;
    font-family: sans-serif;
}

.nat-free-text a {
    color: #4169A8;
    font-weight: 500;
    text-decoration: none;
}

.nat-free-text a:hover { text-decoration: underline; }

.nat-disclaimer {
    font-size: 0.8rem;
    color: #999;
    line-height: 1.6;
    margin: 0;
    font-family: sans-serif;
}

/* ── Mobile ≤ 768px ── */
@media (max-width: 768px) {
    #natalchart-wrapper {
        padding: 0 20px;
    }

    .rrd-headline-title    { font-size: 2.4rem; }
    .rrd-headline-title em { font-size: 32px; }
    .rrd-headline-subtitle p { font-size: 1rem; }

    .nat-form              { padding: 1rem; }
    .nat-form-row          { grid-template-columns: 1fr; gap: 0.75rem; }
    .nat-modes             { flex-direction: column; }
    .nat-mode-btn          { width: 100%; }
    .nat-mode-btn--active  { padding: calc(0.55rem - 1px) calc(1rem - 1px); }
    .nat-coord-grid        { grid-template-columns: 1fr; }
    .nat-deal-row          { flex-direction: column; align-items: stretch; gap: 0.75rem; }
    .nat-btn               { width: 100%; }
    .nat-legend            { justify-content: center; }
    .nat-bigthree          { grid-template-columns: 1fr; gap: 0.75rem; }
    .nat-lore              { grid-template-columns: 1fr; }
    .nat-cta-free          { flex-direction: column; align-items: flex-start; }
    .nat-table-grid        { grid-template-columns: 1fr; }
    .nat-aspects-grid      { grid-template-columns: 1fr; }

    .nat-readings          { padding: 1rem; }
    .nat-wheel-card        { padding: 0.75rem; }
}

@media (max-width: 480px) {
    #natalchart-wrapper { padding: 0 12px; }
    .rrd-headline-title    { font-size: 2rem; }
    .rrd-headline-title em { font-size: 28px; }

    .nat-readings-h2       { font-size: 1.25rem; }
    .nat-readings-h3       { font-size: 1.05rem; }
    .nat-bigthree-sign     { font-size: 1.4rem; }
}
