/* === Moon Calendar — Glassmorphism Theme === */
/* Extends the design language from /faq/style.css */

/* ── Page Title ── */
.nc-moon__title {
    font-size: 32px;
    font-weight: 700;
    margin: 30px 0 10px;
    color: #2d2d2d;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nc-moon__subtitle {
    text-align: center;
    font-size: 17px;
    color: #555;
    margin-bottom: 28px;
    font-weight: 400;
}

/* ── Moon Phase Legend ── */
.nc-moon__legend {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.nc-moon__legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(49, 169, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    min-width: 200px;
}

.nc-moon__legend-emoji {
    font-size: 32px;
    line-height: 1;
}

.nc-moon__legend-text strong {
    display: block;
    font-size: 15px;
    color: #2d2d2d;
    margin-bottom: 2px;
}

.nc-moon__legend-text span {
    font-size: 13px;
    color: #666;
    line-height: 1.3;
}

/* ── Month Selector ── */
.nc-moon__months {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.nc-moon__month-btn {
    padding: 12px 28px;
    font-size: 17px;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #444;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(49, 169, 0, 0.05);
}

.nc-moon__month-btn:hover {
    background: rgba(255, 255, 255, 0.65);
    border-color: rgba(49, 169, 0, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(49, 169, 0, 0.1);
}

.nc-moon__month-btn.active {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(49, 169, 0, 0.5);
    color: #278400;
    box-shadow: 0 4px 20px rgba(49, 169, 0, 0.15), 0 1px 4px rgba(0, 0, 0, 0.05);
}

/* ── Crop Filter Bar ── */
.nc-moon__crop-filter {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 20px;
    flex-wrap: wrap;
    padding: 14px 20px;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 16px;
}

.nc-moon__crop-filter-label {
    display: flex;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    white-space: nowrap;
}

.nc-moon__crop-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
    color: #555;
}

.nc-moon__crop-btn .nc-moon__crop-btn-emoji {
    font-size: 22px;
    line-height: 1;
}

.nc-moon__crop-btn:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(49, 169, 0, 0.3);
    transform: scale(1.05);
}

.nc-moon__crop-btn.active {
    background: rgba(49, 169, 0, 0.12);
    border-color: rgba(49, 169, 0, 0.5);
    color: #278400;
    box-shadow: 0 2px 8px rgba(49, 169, 0, 0.12);
}

/* ── Calendar Container ── */
.nc-moon__calendar {
    background: rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(49, 169, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: opacity 0.3s ease;
}

.nc-moon__calendar.fading {
    opacity: 0.4;
}

/* ── Weekday Headers ── */
.nc-moon__weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.nc-moon__weekday {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #278400;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 0;
}

/* ── Calendar Grid ── */
.nc-moon__grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

/* ── Day Cell ── */
.nc-moon__day {
    position: relative;
    min-height: 120px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(49, 169, 0, 0.04);
    display: flex;
    flex-direction: column;
}

.nc-moon__day:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(49, 169, 0, 0.1), 0 2px 6px rgba(0, 0, 0, 0.04);
    z-index: 2;
}

/* Rating borders */
.nc-moon__day--favorable {
    border-left: 4px solid #31a900;
}

.nc-moon__day--neutral {
    border-left: 4px solid #f0ad4e;
}

.nc-moon__day--unfavorable {
    border-left: 4px solid #d9534f;
}

/* Subtle background tints */
.nc-moon__day--favorable {
    background: rgba(49, 169, 0, 0.05);
}

.nc-moon__day--neutral {
    background: rgba(240, 173, 78, 0.05);
}

.nc-moon__day--unfavorable {
    background: rgba(217, 83, 79, 0.05);
}

.nc-moon__day--favorable:hover {
    background: rgba(49, 169, 0, 0.1);
}

.nc-moon__day--neutral:hover {
    background: rgba(240, 173, 78, 0.1);
}

.nc-moon__day--unfavorable:hover {
    background: rgba(217, 83, 79, 0.1);
}

/* Empty cells */
.nc-moon__day--empty {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: default;
    min-height: 120px;
}

.nc-moon__day--empty:hover {
    transform: none;
    box-shadow: none;
    background: rgba(255, 255, 255, 0.15);
}

/* Today highlight */
.nc-moon__day--today {
    border-color: rgba(49, 169, 0, 0.6);
    box-shadow: 0 0 0 2px rgba(49, 169, 0, 0.2), 0 4px 16px rgba(49, 169, 0, 0.12);
}

.nc-moon__day--today .nc-moon__day-number {
    background: #31a900;
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Day cell header */
.nc-moon__day-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.nc-moon__day-number {
    font-size: 16px;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1;
}

.nc-moon__day-phase {
    font-size: 22px;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Crop icons area */
.nc-moon__day-crops {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    margin-top: auto;
    justify-content: center;
}

.nc-moon__day-crop {
    font-size: 28px;
    line-height: 1;
    transition: transform 0.2s ease, opacity 0.3s ease;
}

.nc-moon__day-crop:hover {
    transform: scale(1.2);
}

/* Dimmed state when crop filter is active */
.nc-moon__day--dimmed {
    opacity: 0.3;
}

.nc-moon__day--dimmed:hover {
    opacity: 0.5;
}

/* Weekend styling */
.nc-moon__day--weekend .nc-moon__day-number {
    color: #d9534f;
}

/* ── Day Detail Modal ── */
.nc-moon__modal .modal-dialog {
    max-width: 560px;
    width: 90%;
}

.nc-moon__modal .modal-content {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 20px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(49, 169, 0, 0.08);
    overflow: hidden;
}

.nc-moon__modal .modal-header {
    background: linear-gradient(135deg, rgba(49, 169, 0, 0.08) 0%, rgba(90, 182, 68, 0.05) 100%);
    border-bottom: 1px solid rgba(49, 169, 0, 0.15);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nc-moon__modal .modal-title {
    font-size: 22px;
    font-weight: 700;
    color: #278400;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nc-moon__modal .modal-header .close {
    color: #666;
    opacity: 0.6;
    text-shadow: none;
    font-size: 28px;
    transition: opacity 0.2s;
    margin: 0;
    padding: 0;
}

.nc-moon__modal .modal-header .close:hover {
    opacity: 1;
    color: #333;
}

.nc-moon__modal .modal-body {
    padding: 20px 24px 28px;
}

/* Modal scrollbar */
.nc-moon__modal .modal-body::-webkit-scrollbar {
    width: 6px;
}

.nc-moon__modal .modal-body::-webkit-scrollbar-track {
    background: transparent;
}

.nc-moon__modal .modal-body::-webkit-scrollbar-thumb {
    background: rgba(49, 169, 0, 0.2);
    border-radius: 3px;
}

/* Modal backdrop */
.nc-moon__modal.in {
    background: rgba(30, 60, 20, 0.35);
}

/* Modal sections */
.nc-moon__modal-phase {
    text-align: center;
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.nc-moon__modal-phase-emoji {
    font-size: 56px;
    display: block;
    margin-bottom: 8px;
    line-height: 1;
}

.nc-moon__modal-phase-name {
    font-size: 18px;
    font-weight: 600;
    color: #2d2d2d;
}

.nc-moon__modal-phase-zodiac {
    font-size: 15px;
    color: #666;
    margin-top: 4px;
}

.nc-moon__modal-rating {
    display: inline-block;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-top: 8px;
}

.nc-moon__modal-rating--favorable {
    background: rgba(49, 169, 0, 0.12);
    color: #278400;
}

.nc-moon__modal-rating--neutral {
    background: rgba(240, 173, 78, 0.15);
    color: #b87c1e;
}

.nc-moon__modal-rating--unfavorable {
    background: rgba(217, 83, 79, 0.12);
    color: #c0392b;
}

/* Recommended / Not recommended sections */
.nc-moon__modal-section {
    margin-bottom: 18px;
}

.nc-moon__modal-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d2d2d;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nc-moon__modal-section-title .fa {
    color: #31a900;
    font-size: 16px;
}

.nc-moon__modal-section-title--avoid .fa {
    color: #d9534f;
}

.nc-moon__modal-crops {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nc-moon__modal-crop {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: rgba(49, 169, 0, 0.06);
    border: 1px solid rgba(49, 169, 0, 0.15);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.nc-moon__modal-crop:hover {
    background: rgba(49, 169, 0, 0.12);
}

.nc-moon__modal-crop-emoji {
    font-size: 32px;
    line-height: 1;
}

.nc-moon__modal-crop-name {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.nc-moon__modal-crop--avoid {
    background: rgba(217, 83, 79, 0.06);
    border-color: rgba(217, 83, 79, 0.15);
}

.nc-moon__modal-crop--avoid:hover {
    background: rgba(217, 83, 79, 0.12);
}

/* Tip section */
.nc-moon__modal-tip {
    padding: 14px 16px;
    background: rgba(49, 169, 0, 0.05);
    border-radius: 12px;
    border-left: 3px solid #31a900;
    font-size: 15px;
    color: #444;
    line-height: 1.6;
}

.nc-moon__modal-tip strong {
    color: #278400;
}

/* ── Mobile List View ── */
.nc-moon__list {
    display: none;
}

.nc-moon__list-day {
    display: flex;
    gap: 14px;
    padding: 16px;
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.55);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(49, 169, 0, 0.04);
}

.nc-moon__list-day:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(49, 169, 0, 0.1);
}

.nc-moon__list-day--favorable {
    border-left: 4px solid #31a900;
}

.nc-moon__list-day--neutral {
    border-left: 4px solid #f0ad4e;
}

.nc-moon__list-day--unfavorable {
    border-left: 4px solid #d9534f;
}

.nc-moon__list-day--dimmed {
    opacity: 0.3;
}

.nc-moon__list-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.nc-moon__list-date-num {
    font-size: 24px;
    font-weight: 700;
    color: #2d2d2d;
    line-height: 1;
}

.nc-moon__list-date-weekday {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    margin-top: 4px;
}

.nc-moon__list-phase {
    font-size: 28px;
    line-height: 1;
    display: flex;
    align-items: center;
}

.nc-moon__list-info {
    flex: 1;
}

.nc-moon__list-phase-name {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.nc-moon__list-crops {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.nc-moon__list-crop {
    font-size: 26px;
    line-height: 1;
}

/* ── Responsive ── */

/* Tablet */
@media screen and (max-width: 740px) {
    .nc-moon__title {
        font-size: 26px;
    }

    .nc-moon__subtitle {
        font-size: 15px;
    }

    .nc-moon__legend {
        gap: 8px;
    }

    .nc-moon__legend-item {
        padding: 10px 14px;
        min-width: 170px;
    }

    .nc-moon__legend-emoji {
        font-size: 26px;
    }

    .nc-moon__legend-text strong {
        font-size: 13px;
    }

    .nc-moon__legend-text span {
        font-size: 12px;
    }

    .nc-moon__month-btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .nc-moon__calendar {
        padding: 12px;
        border-radius: 16px;
    }

    .nc-moon__grid {
        gap: 5px;
    }

    .nc-moon__day {
        min-height: 100px;
        padding: 8px;
        border-radius: 10px;
    }

    .nc-moon__day-phase {
        font-size: 18px;
    }

    .nc-moon__day-crop {
        font-size: 22px;
    }

    .nc-moon__weekday {
        font-size: 12px;
    }

    .nc-moon__crop-btn .nc-moon__crop-btn-emoji {
        font-size: 18px;
    }

    .nc-moon__crop-btn {
        padding: 4px 8px;
        font-size: 12px;
    }

    .nc-moon__modal .modal-dialog {
        width: 95%;
        margin: 20px auto;
    }

    .nc-moon__modal .modal-content {
        border-radius: 14px;
    }

    .nc-moon__modal .modal-title {
        font-size: 19px;
    }
}

/* Mobile — switch to list view */
@media screen and (max-width: 480px) {
    .nc-moon__calendar {
        display: none;
    }

    .nc-moon__list {
        display: block;
    }

    .nc-moon__legend {
        flex-direction: column;
        align-items: center;
    }

    .nc-moon__legend-item {
        width: 100%;
        max-width: 320px;
    }

    .nc-moon__title {
        font-size: 22px;
    }

    .nc-moon__month-btn {
        padding: 8px 16px;
        font-size: 14px;
    }

    .nc-moon__crop-filter {
        padding: 10px 12px;
        gap: 4px;
    }

    .nc-moon__crop-filter-label {
        width: 100%;
        justify-content: center;
        margin-right: 0;
        margin-bottom: 4px;
    }

    .nc-moon__modal .modal-body {
        padding: 16px;
    }

    .nc-moon__modal-phase-emoji {
        font-size: 44px;
    }

    .nc-moon__modal-crop-emoji {
        font-size: 26px;
    }
}

/* ── Print ── */
@media print {
    .content.nc-conditions {
        background: #fff !important;
    }

    .nc-moon__months,
    .nc-moon__crop-filter,
    .nc-moon__legend {
        display: none !important;
    }

    .nc-moon__calendar {
        background: none !important;
        backdrop-filter: none !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }

    .nc-moon__day {
        background: none !important;
        backdrop-filter: none !important;
        border: 1px solid #ddd !important;
        box-shadow: none !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .nc-moon__day--favorable {
        border-left: 4px solid #31a900 !important;
    }

    .nc-moon__day--neutral {
        border-left: 4px solid #f0ad4e !important;
    }

    .nc-moon__day--unfavorable {
        border-left: 4px solid #d9534f !important;
    }

    .nc-moon__list {
        display: none !important;
    }

    .nc-moon__calendar {
        display: block !important;
    }
}
