/* =========================================================
   LUNAR MANSION READING
   style.css
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background: #f4f1eb;
    color: #292722;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}


/* =========================================================
   PAGE
   ========================================================= */

.page-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
}


/* =========================================================
   READING CONTAINER
   ========================================================= */

.reading-container {
    width: 100%;
    max-width: 680px;
    background: #ffffff;
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}


/* =========================================================
   HEADER
   ========================================================= */

.reading-header {
    text-align: center;
    margin-bottom: 40px;
}

.reading-header h1 {
    margin: 0 0 12px;
    font-size: 36px;
    line-height: 1.2;
    font-weight: 600;
    color: #292722;
}

.reading-header p {
    max-width: 500px;
    margin: 0 auto;
    color: #77736c;
    font-size: 16px;
}


/* =========================================================
   FORM
   ========================================================= */

.reading-form {
    width: 100%;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #36332e;
    font-size: 15px;
    font-weight: 600;
}

.form-group input,
.form-group select {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 15px;

    background: #ffffff;
    color: #292722;

    border: 1px solid #d6d1c8;
    border-radius: 6px;

    font-family: inherit;
    font-size: 16px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #8b7653;
    box-shadow: 0 0 0 3px rgba(139, 118, 83, 0.12);
}


/* =========================================================
   SUBMIT BUTTON
   ========================================================= */

.form-submit {
    margin-top: 35px;
}

.submit-button {
    width: 100%;
    min-height: 54px;

    padding: 14px 25px;

    border: 0;
    border-radius: 6px;

    background: #292722;
    color: #ffffff;

    font-family: inherit;
    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background 0.2s ease,
        transform 0.1s ease;
}

.submit-button:hover {
    background: #403d37;
}

.submit-button:active {
    transform: translateY(1px);
}


/* =========================================================
   MOBILE
   ========================================================= */

@media only screen and (max-width: 700px) {

    .page-wrapper {
        padding: 25px 15px;
        align-items: flex-start;
    }

    .reading-container {
        padding: 35px 25px;
    }

    .reading-header {
        margin-bottom: 30px;
    }

    .reading-header h1 {
        font-size: 29px;
    }

}

/* =========================================================
   RESULT PAGE
   ========================================================= */

.result-page {
    align-items: flex-start;
}

.result-container {
    max-width: 850px;
}


/* =========================================================
   RESULT SECTIONS
   ========================================================= */

.result-section {
    margin-top: 35px;
    padding-top: 35px;
    border-top: 1px solid #e5e0d8;
}

.result-section h2 {
    margin: 0 0 25px;
    font-size: 24px;
    color: #292722;
}


/* =========================================================
   PERSONAL DETAILS
   ========================================================= */

.personal-details {
    width: 100%;
}

.detail-row {
    display: flex;
    padding: 11px 0;
    border-bottom: 1px solid #f0ede8;
}

.detail-label {
    width: 180px;
    flex-shrink: 0;
    color: #77736c;
}

.detail-value {
    color: #292722;
    font-weight: 600;
}


/* =========================================================
   BIRTH SIGNS
   ========================================================= */

.birth-sign-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.birth-sign-box {
    padding: 25px;
    background: #f7f4ee;
    border-radius: 8px;
    text-align: center;
}

.birth-sign-label {
    display: block;
    margin-bottom: 7px;
    color: #77736c;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.birth-sign-value {
    display: block;
    color: #292722;
    font-size: 22px;
}


/* =========================================================
   SKY ANIMAL
   ========================================================= */

.sky-animal-section {
    text-align: center;
}

.section-heading {
    margin-bottom: 25px;
}

.section-small-title {
    display: block;
    margin-bottom: 8px;
    color: #8b7653;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.section-heading h2 {
    margin: 0;
    font-size: 38px;
}

.sky-number {
    margin: 25px 0;
}

.sky-number span {
    display: block;
    margin-bottom: 5px;
    color: #77736c;
}

.sky-number strong {
    font-size: 32px;
}

.sky-family {
    margin: 25px 0 35px;
}

.sky-family span {
    display: block;
    margin-bottom: 6px;
    color: #77736c;
}

.sky-family strong {
    font-size: 20px;
    letter-spacing: 1px;
}

.sky-description {
    max-width: 680px;
    margin: 0 auto;
    color: #4c4943;
    font-size: 17px;
    line-height: 1.85;
    text-align: left;
}

.sky-description p {
    margin: 0 0 18px;
}

.sky-description p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.result-actions {
    display: flex;
    gap: 15px;
    margin-top: 45px;
    padding-top: 30px;
    border-top: 1px solid #e5e0d8;
}

.result-actions > * {
    flex: 1;
}

.pdf-form {
    margin: 0;
}

.button-link {
    display: flex;
    align-items: center;
    justify-content: center;

    min-height: 54px;
    padding: 14px 25px;

    border-radius: 6px;

    text-decoration: none;
    font-weight: 600;
}

.secondary-button {
    border: 1px solid #292722;
    background: #ffffff;
    color: #292722;
}

.secondary-button:hover {
    background: #f5f3ef;
}


/* =========================================================
   ERRORS
   ========================================================= */

.error-box {
    padding: 20px 25px;
    background: #f8eeee;
    border: 1px solid #e5caca;
    border-radius: 6px;
}

.error-box p {
    margin: 5px 0;
}


/* =========================================================
   RESULT MOBILE
   ========================================================= */

@media only screen and (max-width: 700px) {

    .detail-row {
        display: block;
    }

    .detail-label {
        width: 100%;
        margin-bottom: 3px;
    }

    .birth-sign-grid {
        grid-template-columns: 1fr;
    }

    .section-heading h2 {
        font-size: 31px;
    }

    .result-actions {
        flex-direction: column;
    }

}

/* =========================================================
   MONTHLY CALENDAR ICONS
   ========================================================= */

.calendar-icons-cell {
    min-width: 80px;
    white-space: normal;
    line-height: 1;
}

.calendar-icon {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    max-height: 24px !important;

    display: inline-block !important;
    object-fit: contain;

    margin: 2px;
    vertical-align: middle;
}

.calendar-legend-item .calendar-icon {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;
}


/* =========================================================
   CALENDAR LEGEND
   ========================================================= */

.calendar-legend {
    margin-top: 30px;
    padding: 20px;

    background: #f8f8f8;
    border-radius: 10px;
}

.calendar-legend h3 {
    margin-top: 0;
}

.calendar-legend-group {
    margin-top: 20px;
}

.calendar-legend-group h4 {
    margin-bottom: 10px;
}

.calendar-legend-items {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.calendar-legend-item {
    display: flex;
    align-items: center;

    gap: 8px;
    min-width: 210px;
}

.calendar-legend-item img.calendar-icon {
    width: 30px !important;
    height: 30px !important;
    max-width: 30px !important;
    max-height: 30px !important;

    margin: 0;
}


/* =========================================================
   MONTHLY CALENDAR
   ========================================================= */

.monthly-calendar-section {
    margin-top: 50px;
    padding-top: 35px;
    border-top: 1px solid #e5e0d8;
}


/* =========================================================
   MONTH HEADING
   ========================================================= */

.monthly-calendar-heading {
    margin-bottom: 25px;
    text-align: center;
}

.monthly-calendar-heading h2 {
    margin: 0;
    font-size: 28px;
    color: #292722;
}

.monthly-calendar-heading p {
    margin: 5px 0 0;
    color: #77736c;
    font-size: 14px;
}


/* =========================================================
   CALENDAR GRID
   ========================================================= */

.monthly-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);

    width: 100%;

    border-top: 1px solid #d8d3ca;
    border-left: 1px solid #d8d3ca;

    background: #ffffff;
}


/* =========================================================
   WEEKDAY
   ========================================================= */

.calendar-weekday {
    padding: 10px 4px;

    background: #292722;
    color: #ffffff;

    border-right: 1px solid #49463f;
    border-bottom: 1px solid #49463f;

    text-align: center;

    font-size: 11px;
    font-weight: 600;

    text-transform: uppercase;
    letter-spacing: 0.4px;
}


/* =========================================================
   DAY CELL
   ========================================================= */

.calendar-day {
    position: relative;

    min-width: 0;
    min-height: 115px;

    padding: 8px;

    border-right: 1px solid #d8d3ca;
    border-bottom: 1px solid #d8d3ca;

    background: #ffffff;
}


/* =========================================================
   EMPTY DAY
   ========================================================= */

.calendar-day-empty {
    background: #f7f5f1;
}


/* =========================================================
   DATE NUMBER
   ========================================================= */

.calendar-date-number {
    margin-bottom: 7px;

    color: #292722;

    font-size: 16px;
    font-weight: 700;
}


/* =========================================================
   GOOD / BAD DAY
   ========================================================= */

.calendar-day-quality {
    min-height: 28px;

    margin-bottom: 5px;
    padding-bottom: 5px;

    border-bottom: 1px solid #eeeae3;
}


/* =========================================================
   STARS
   ========================================================= */

.calendar-day-stars {
    display: flex;
    flex-wrap: wrap;

    align-content: flex-start;

    gap: 2px;
}


/* =========================================================
   CALENDAR ICON SIZE
   ========================================================= */

.calendar-day .calendar-icon {
    width: 22px !important;
    height: 22px !important;

    max-width: 22px !important;
    max-height: 22px !important;

    margin: 1px;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media only screen and (max-width: 700px) {

    .monthly-calendar-section {
        overflow-x: auto;
    }

    .monthly-calendar {
        min-width: 700px;
    }

}

/* =========================================================
   FORECAST-STYLE MONTHLY CALENDAR
   ========================================================= */

.forecast-calendar-section {
    width: 100%;
    margin-top: 50px;
    padding-top: 35px;
    border-top: 1px solid #e5e0d8;
}


/* =========================================================
   MONTH HEADER
   ========================================================= */

.forecast-month-header {
    display: flex;
    align-items: baseline;
    gap: 9px;

    padding: 0 6px 12px;

    border-bottom: 2px solid #292722;
}

.forecast-month-header span {
    color: #1680aa;
    font-size: 30px;
    font-weight: 500;
    letter-spacing: 2px;
}

.forecast-month-header strong {
    color: #292722;
    font-size: 28px;
    font-weight: 300;
}


/* =========================================================
   EACH DAY
   ========================================================= */

.forecast-day {
    width: 100%;
    padding: 13px 6px 14px;
    border-bottom: 1px solid #ddd8cf;
}


/* =========================================================
   ROW 1
   DATE + GOOD/BAD DAY
   ========================================================= */

.forecast-date-row {
    display: flex;
    align-items: center;

    min-height: 34px;

    margin-bottom: 5px;
}


/* =========================================================
   DATE
   ========================================================= */

.forecast-date {
    display: flex;
    align-items: baseline;

    gap: 8px;

    width: 115px;
    flex-shrink: 0;
}

.forecast-date strong {
    min-width: 28px;

    color: #292722;

    font-size: 18px;
    font-weight: 700;
}

.forecast-date span {
    color: #77736c;

    font-size: 13px;
    font-weight: 600;

    letter-spacing: 1px;
}


/* =========================================================
   GOOD / BAD DAY
   ========================================================= */

.forecast-day-quality {
    display: flex;
    align-items: center;

    min-height: 32px;
}


/* =========================================================
   GOOD / BAD DAY BRUSH HIGHLIGHT
   ========================================================= */

.forecast-quality-highlight {
    position: relative;

    display: inline-flex;
    align-items: center;

    gap: 7px;

    min-width: 210px;

    padding: 3px 20px 3px 5px;

    isolation: isolate;
}

.forecast-quality-highlight::before {
    content: "";

    position: absolute;

    z-index: -1;

    left: 0;
    right: 0;

    top: 50%;

    height: 25px;

    transform:
        translateY(-50%)
        rotate(-0.4deg);

    border-radius:
        40% 15% 45% 20% /
        35% 55% 30% 55%;
}


/* =========================================================
   EXCELLENCE
   Light Gold
   ========================================================= */

.forecast-quality-highlight.excellence::before {
    background:
        linear-gradient(
            90deg,
            rgba(232, 179, 87, 0.05),
            rgba(232, 179, 87, 0.22),
            rgba(232, 179, 87, 0.16),
            rgba(232, 179, 87, 0.02)
        );
}


/* =========================================================
   VITALITY
   Light Green
   ========================================================= */

.forecast-quality-highlight.vitality::before {
    background:
        linear-gradient(
            90deg,
            rgba(104, 166, 116, 0.05),
            rgba(104, 166, 116, 0.20),
            rgba(104, 166, 116, 0.14),
            rgba(104, 166, 116, 0.02)
        );
}


/* =========================================================
   OBSTACLES
   Light Muted Red
   ========================================================= */

.forecast-quality-highlight.obstacles::before {
    background:
        linear-gradient(
            90deg,
            rgba(173, 92, 92, 0.04),
            rgba(173, 92, 92, 0.17),
            rgba(173, 92, 92, 0.11),
            rgba(173, 92, 92, 0.01)
        );
}


/* =========================================================
   GOOD / BAD DAY TEXT
   ========================================================= */

.forecast-quality-name {
    position: relative;

    color: #4c4943;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.4;

    white-space: nowrap;
}


/* =========================================================
   ROW 2 + ROW 3

   Lunar Mansion       Paht Chee Stars
   EB of the Day       Sky Animal Stars
   ========================================================= */

.forecast-info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    width: 100%;

    min-height: 36px;

    gap: 20px;
}


/* =========================================================
   LEFT INFORMATION
   ========================================================= */

.forecast-info {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;

    gap: 5px;

    min-width: 0;

    font-size: 13px;
    line-height: 1.4;
}

.forecast-info-label {
    color: #77736c;
}

.forecast-info strong {
    color: #292722;

    font-weight: 600;
}


/* =========================================================
   RIGHT STAR GROUPS
   ========================================================= */

.forecast-paht-chee,
.forecast-sky-stars {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    flex-wrap: wrap;

    gap: 5px;

    flex-shrink: 0;

    min-height: 34px;
}


/* =========================================================
   GOOD / BAD DAY ICON

   Keep this smaller than Star icons
   ========================================================= */

.forecast-day-quality .calendar-icon {
    display: inline-block !important;

    width: 25px !important;
    height: 25px !important;

    max-width: 25px !important;
    max-height: 25px !important;

    object-fit: contain;

    margin: 0;

    vertical-align: middle;
}


/* =========================================================
   STAR ICONS

   Larger for easier identification
   ========================================================= */

.forecast-paht-chee .calendar-icon,
.forecast-sky-stars .calendar-icon {
    display: inline-block !important;

    width: 34px !important;
    height: 34px !important;

    max-width: 34px !important;
    max-height: 34px !important;

    object-fit: contain;

    margin: 0;

    vertical-align: middle;
}


/* =========================================================
   WEEKEND
   ========================================================= */

.forecast-day.weekend .forecast-date strong,
.forecast-day.weekend .forecast-date span {
    color: #1680aa;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media only screen and (max-width: 700px) {

    .forecast-calendar-section {
        margin-top: 35px;
        padding-top: 25px;
    }


    /* MONTH */

    .forecast-month-header {
        padding-bottom: 10px;
    }

    .forecast-month-header span {
        font-size: 24px;

        letter-spacing: 1.5px;
    }

    .forecast-month-header strong {
        font-size: 22px;
    }


    /* DAY */

    .forecast-day {
        padding: 12px 4px 13px;
    }


    /* DATE */

    .forecast-date {
        width: 95px;
    }

    .forecast-date strong {
        min-width: 25px;

        font-size: 16px;
    }

    .forecast-date span {
        font-size: 12px;
    }


    /* TEXT */

    .forecast-info,
    .forecast-quality-name {
        font-size: 12px;
    }


    /* ROW */

    .forecast-info-row {
        gap: 10px;
    }


    /* BRUSH */

    .forecast-quality-highlight {
        min-width: 180px;
    }


    /* GOOD / BAD DAY ICON */

    .forecast-day-quality .calendar-icon {
        width: 23px !important;
        height: 23px !important;

        max-width: 23px !important;
        max-height: 23px !important;
    }


    /* STAR ICONS */

    .forecast-paht-chee .calendar-icon,
    .forecast-sky-stars .calendar-icon {
        width: 30px !important;
        height: 30px !important;

        max-width: 30px !important;
        max-height: 30px !important;
    }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media only screen and (max-width: 480px) {

    .forecast-date-row {
        align-items: flex-start;
    }

    .forecast-date {
        width: 80px;
    }

    .forecast-info-row {
        align-items: flex-start;

        gap: 8px;
    }


    /* STAR AREA */

    .forecast-paht-chee,
    .forecast-sky-stars {
        max-width: 170px;
    }


    /* BRUSH */

    .forecast-quality-highlight {
        min-width: 155px;

        padding-right: 12px;
    }


    /* GOOD / BAD DAY ICON */

    .forecast-day-quality .calendar-icon {
        width: 21px !important;
        height: 21px !important;

        max-width: 21px !important;
        max-height: 21px !important;
    }


    /* STAR ICONS */

    .forecast-paht-chee .calendar-icon,
    .forecast-sky-stars .calendar-icon {
        width: 28px !important;
        height: 28px !important;

        max-width: 28px !important;
        max-height: 28px !important;
    }

}