/**
 * Calculators — shared styles for all calculator pages.
 */

/* ─── Calculator container ──────────────────────────────────────── */

.aw-calc {
    max-width: 720px;
    margin: 0 auto 40px;
}

/* ─── Index page (calculators hub) ──────────────────────────────── */

.aw-calc-index {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.aw-calc-index__card {
    display: block;
    background: #fafaf8;
    border: 1px solid #e8e6df;
    border-radius: 12px;
    padding: 24px 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.aw-calc-index__card:hover {
    border-color: #dc9814;
    box-shadow: 0 4px 16px rgba(220, 152, 20, 0.12);
    transform: translateY(-2px);
}

.aw-calc-index__icon {
    display: block;
    font-size: 32px;
    line-height: 1;
    margin-bottom: 12px;
}

.aw-calc-index__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px;
    color: #1a1a1a;
}

.aw-calc-index__text {
    font-size: 14px;
    line-height: 1.5;
    color: #666;
    margin: 0;
}

@media (max-width: 640px) {
    .aw-calc-index {
        grid-template-columns: 1fr;
    }
}

.aw-calc__intro {
    margin-bottom: 32px;
    font-size: 17px;
    line-height: 1.7;
    color: #444;
}

.aw-calc__intro p:last-child {
    margin-bottom: 0;
}

/* ─── Form ──────────────────────────────────────────────────────── */

.aw-calc-form {
    background: #fafaf8;
    border: 1px solid #e8e6df;
    border-radius: 12px;
    padding: 28px 28px 24px;
    margin-bottom: 32px;
}

.aw-calc-form__title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px;
    color: #1a1a1a;
}

.aw-calc-form__row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.aw-calc-form__field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.aw-calc-form__field--full {
    flex: 1 1 100%;
}

.aw-calc-form__label {
    font-size: 13px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.aw-calc-form__input {
    height: 44px;
    padding: 0 14px;
    border: 1px solid #d4d2cc;
    border-radius: 8px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fff;
    transition: border-color 0.2s;
    -webkit-appearance: none;
}

.aw-calc-form__input:focus {
    outline: none;
    border-color: #dc9814;
    box-shadow: 0 0 0 3px rgba(220, 152, 20, 0.12);
}

.aw-calc-form__input::placeholder {
    color: #aaa;
}

/* City autocomplete */
.aw-calc-city-wrap {
    position: relative;
}

.aw-calc-city-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #d4d2cc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 220px;
    overflow-y: auto;
    display: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.aw-calc-city-results.is-open {
    display: block;
}

.aw-calc-city-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.aw-calc-city-item:last-child {
    border-bottom: none;
}

.aw-calc-city-item:hover,
.aw-calc-city-item.is-active {
    background: #fdf6e3;
    color: #1a1a1a;
}

/* Submit */
.aw-calc-form__submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 48px;
    padding: 0 32px;
    background: #dc9814;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    margin-top: 4px;
}

.aw-calc-form__submit:hover {
    background: #c5870f;
}

.aw-calc-form__submit:active {
    transform: scale(0.98);
}

.aw-calc-form__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.aw-calc-form__submit .spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: aw-spin 0.6s linear infinite;
}

.aw-calc-form__submit.is-loading .spinner {
    display: block;
}

.aw-calc-form__submit.is-loading .btn-text {
    display: none;
}

@keyframes aw-spin {
    to { transform: rotate(360deg); }
}

/* ─── Separator (person 1 / person 2) ───────────────────────────── */

.aw-calc-form__separator {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #999;
    margin: 20px 0;
    position: relative;
}

.aw-calc-form__separator::before,
.aw-calc-form__separator::after {
    content: '';
    position: absolute;
    top: 50%;
    width: calc(50% - 60px);
    height: 1px;
    background: #e0ded8;
}

.aw-calc-form__separator::before { left: 0; }
.aw-calc-form__separator::after  { right: 0; }

/* ─── Result card ───────────────────────────────────────────────── */

.aw-calc-result {
    display: none;
    background: #fff;
    border: 1px solid #e8e6df;
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 32px;
    animation: aw-fadeIn 0.4s ease;
}

.aw-calc-result.is-visible {
    display: block;
}

@keyframes aw-fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.aw-calc-result__header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0eeea;
}

.aw-calc-result__symbol {
    font-size: 48px;
    line-height: 1;
}

.aw-calc-result__sign-name {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

.aw-calc-result__degree {
    font-size: 14px;
    color: #888;
    margin-top: 4px;
}

.aw-calc-result__body {
    font-size: 16px;
    line-height: 1.75;
    color: #333;
}

.aw-calc-result__body p {
    margin: 0 0 16px;
}

.aw-calc-result__body p:last-child {
    margin-bottom: 0;
}

/* ─── Error ─────────────────────────────────────────────────────── */

.aw-calc-error {
    display: none;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 14px 18px;
    margin-bottom: 20px;
    font-size: 14px;
    color: #991b1b;
}

.aw-calc-error.is-visible {
    display: block;
}

/* ─── Synastry specifics ────────────────────────────────────────── */

.aw-calc-compat {
    text-align: center;
    margin-bottom: 28px;
}

.aw-calc-compat__score {
    font-size: 64px;
    font-weight: 800;
    color: #dc9814;
    line-height: 1;
}

.aw-calc-compat__label {
    font-size: 16px;
    color: #666;
    margin-top: 4px;
}

.aw-calc-aspects {
    list-style: none;
    padding: 0;
    margin: 0;
}

.aw-calc-aspects li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 15px;
}

.aw-calc-aspects li:last-child {
    border-bottom: none;
}

.aw-calc-aspect__planets {
    font-weight: 500;
}

.aw-calc-aspect__type {
    font-size: 13px;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}

.aw-calc-aspect__type--harmonic {
    background: #ecfdf5;
    color: #065f46;
}

.aw-calc-aspect__type--tense {
    background: #fef2f2;
    color: #991b1b;
}

/* ─── Mercury Retrograde table ──────────────────────────────────── */

.aw-calc-retro-table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}

.aw-calc-retro-table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    padding: 10px 12px;
    border-bottom: 2px solid #e0ded8;
}

.aw-calc-retro-table td {
    padding: 12px;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
    color: #333;
}

.aw-calc-retro-table tr.is-current {
    background: #fdf6e3;
    font-weight: 600;
}

.aw-calc-retro-table tr.is-current td {
    color: #92400e;
}

/* ─── Solar Return planet table ─────────────────────────────────── */

.aw-calc-planets-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.aw-calc-planets-table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #666;
    padding: 8px 12px;
    border-bottom: 2px solid #e0ded8;
}

.aw-calc-planets-table td {
    padding: 10px 12px;
    font-size: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.aw-calc-planets-table .retro {
    color: #dc2626;
    font-size: 12px;
    margin-left: 4px;
}

/* ─── Matrix of Destiny — wide layout ───────────────────────────── */

.aw-calc--wide {
    max-width: 860px;
}

/* ─── Diamond diagram ───────────────────────────────────────────── */

.aw-matrix-diagram {
    max-width: 420px;
    margin: 0 auto 32px;
}

.aw-matrix-svg {
    width: 100%;
    height: auto;
}

/* ─── Key numbers list ──────────────────────────────────────────── */

.aw-matrix-keys {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.aw-matrix-key {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: #fafaf8;
    border: 1px solid #e8e6df;
    border-radius: 10px;
    padding: 14px;
}

.aw-matrix-key__num {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #dc9814;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50%;
}

.aw-matrix-key__label {
    font-size: 14px;
    color: #333;
    margin-bottom: 2px;
}

.aw-matrix-key__desc {
    font-size: 12px;
    color: #888;
    line-height: 1.4;
}

/* ─── Chakras ───────────────────────────────────────────────────── */

.aw-matrix-chakras {
    margin-bottom: 32px;
}

.aw-matrix-chakra {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}

.aw-matrix-chakra:last-child {
    border-bottom: none;
}

.aw-matrix-chakra__dot {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border-radius: 50%;
}

.aw-matrix-chakra__info {
    flex: 1;
}

.aw-matrix-chakra__name {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.aw-matrix-chakra__numbers {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.aw-matrix-chakra__value {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

/* ─── Interpretation sections (collapsible) ─────────────────────── */

.aw-matrix-section {
    border: 1px solid #e8e6df;
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
}

.aw-matrix-section__title {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 18px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    cursor: pointer;
    background: #fafaf8;
    list-style: none;
}

.aw-matrix-section__title::-webkit-details-marker {
    display: none;
}

.aw-matrix-section__title::after {
    content: '▾';
    margin-left: auto;
    font-size: 14px;
    color: #aaa;
    transition: transform 0.2s;
}

.aw-matrix-section[open] > .aw-matrix-section__title::after {
    transform: rotate(180deg);
}

.aw-matrix-section__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #dc9814;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.aw-matrix-section__body {
    padding: 4px 18px 18px;
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

.aw-matrix-section__body p {
    margin: 0 0 12px;
}

.aw-matrix-section__body p:last-child {
    margin-bottom: 0;
}

.aw-matrix-section__body strong {
    color: #1a1a1a;
}

/* ─── Tarot ─────────────────────────────────────────────────────── */

.aw-calc-tarot-spread {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 24px 0;
}

.aw-calc-tarot-card {
    width: 180px;
    background: #fafaf8;
    border: 2px solid #e8e6df;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
    position: relative;
    min-height: 260px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.aw-calc-tarot-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.aw-calc-tarot-card.is-revealed {
    border-color: #dc9814;
    cursor: default;
}

.aw-calc-tarot-card__back {
    font-size: 48px;
    color: #c4b5a0;
}

.aw-calc-tarot-card__front {
    display: none;
}

.aw-calc-tarot-card.is-revealed .aw-calc-tarot-card__back {
    display: none;
}

.aw-calc-tarot-card.is-revealed .aw-calc-tarot-card__front {
    display: block;
}

.aw-calc-tarot-card__name {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.aw-calc-tarot-card__position {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.aw-calc-tarot-card__image {
    width: 100%;
    max-width: 120px;
    height: auto;
    border-radius: 6px;
    margin: 8px 0;
}

.aw-calc-tarot-meaning {
    margin-top: 24px;
}

.aw-calc-tarot-meaning__card {
    background: #fafaf8;
    border: 1px solid #e8e6df;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 16px;
}

.aw-calc-tarot-meaning__title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 6px;
}

.aw-calc-tarot-meaning__position {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}

.aw-calc-tarot-meaning__text {
    font-size: 15px;
    line-height: 1.7;
    color: #444;
}

/* ─── Spread type selector ──────────────────────────────────────── */

.aw-calc-tarot-types {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.aw-calc-tarot-types__btn {
    padding: 10px 20px;
    border: 1px solid #d4d2cc;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.aw-calc-tarot-types__btn:hover {
    border-color: #dc9814;
    color: #dc9814;
}

.aw-calc-tarot-types__btn.is-active {
    background: #dc9814;
    color: #fff;
    border-color: #dc9814;
}

/* ─── SEO content below calculator ──────────────────────────────── */

.aw-calc-seo {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e8e6df;
}

.aw-calc-seo h2 {
    font-size: 22px;
    margin: 0 0 16px;
}

.aw-calc-seo h3 {
    font-size: 18px;
    margin: 24px 0 12px;
}

.aw-calc-seo p {
    font-size: 16px;
    line-height: 1.75;
    color: #444;
    margin: 0 0 16px;
}

/* ─── Responsive ────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .aw-calc-form {
        padding: 20px 16px 16px;
    }

    .aw-calc-form__row {
        flex-direction: column;
        gap: 12px;
    }

    .aw-calc-result {
        padding: 20px;
    }

    .aw-calc-result__symbol {
        font-size: 36px;
    }

    .aw-calc-result__sign-name {
        font-size: 22px;
    }

    .aw-calc-compat__score {
        font-size: 48px;
    }

    .aw-calc-tarot-spread {
        gap: 12px;
    }

    .aw-calc-tarot-card {
        width: calc(50% - 6px);
        min-height: 200px;
    }

    .aw-matrix-keys {
        grid-template-columns: 1fr;
    }

    .aw-matrix-diagram {
        max-width: 320px;
    }
}
