/* ================================
   Monthyear – desktop
================================ */

.monthyear {
    margin-top: 9px;
    margin-bottom: 29px;
}

.ad--top .ad__inner {
    display: flex;
    justify-content: center;

    text-align: center;
}

.monthyear__title {
    margin-top: 20px;
    margin-bottom: 17px;

    font-size: 26px;
    font-weight: 700;
    text-align: center;
}

.moon-banner {
    display: flex;
    align-items: flex-start;
    gap: 29px;

    padding: 25px 50px;
    width: 100%;

    background: #303A62;
}

/* Left moon summary card */
.moon-banner__summary {
    flex-shrink: 0;

    padding: 15px 16px 14px;
    min-width: 276px;

    color: #ffffff;
    text-align: center;

    background: #414B77;
}

.moon-banner__summary-date {
    font-size: 20px;
    font-weight: 500;
}

.moon-banner__image-wrap {
    margin-top: 13px;
}

.moon-banner__image-wrap picture {
    display: block;
}

.moon-banner__image {
    display: block;

    margin: 0 auto;
    width: 104px;
    height: 104px;
}

.moon-banner__phase {
    margin-top: 7px;

    font-size: 20px;
    font-weight: 600;
}

.moon-banner__illumination {
    margin-top: 1px;

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

/* Middle moon details */
.moon-banner__details {
    display: flex;
    flex-direction: column;

    flex: 1 0 auto;

    margin-top: 10px;

    font-size: 18px;
    font-weight: 500;
    color: #ffffff;
}

.moon-banner__detail + .moon-banner__detail {
    margin-top: 15px;
}

.moon-banner__map-ad-row {
    flex-shrink: 0;
}

.moon-banner__map-area {
    display: flex;
    flex-direction: column;
    align-items: center;

    width: 298px;
}

.moon-banner__map-wrap {
    width: 298px;
    height: 230px;
}

.moon-banner__map {
    width: 100%;
    height: 100%;
}

.leaflet-popup-content {
    text-align: center;
}

.leaflet-popup-content .location-text {
    font-size: 13px;
    font-weight: 500;
    color: #444;
}

.moon-banner__ad,
.ad__slot--tablet-middle {
    display: none;
}

.moon-banner__note {
    margin-top: 4px;

    font-size: 12px;
    font-weight: 500;
    color: #767676;
}

.moon-banner__note--fallback {
    color: #E15757;
}

.moon-phases-table-section {
    margin-top: 29px;
}

.moon-phases-table-section__title {
    font-size: 20px;
    font-weight: 600;
    color: #444444;
}

.moon-phases-table-section__table-area {
    position: relative;

    margin-top: 20px;
}

.moon-phases-table-section__filter {
    display: flex;
    align-items: center;
    gap: 4px;

    position: absolute;
    top: -40px;
    right: 0;
}

.moon-phases-table-section__select {
    border: 1px solid #ACACAC;
    border-radius: 3px;
    padding: 0 10px;
    height: 30px;

    font-size: 14px;
    font-weight: 500;
    color: #444444;

    background: url("https://static.todaysmoonphase.com/static/img/icons/icon-caret.svg") no-repeat right 4px center / 20px 20px, #ffffff;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.moon-phases-table-section__select--month {
    width: 183px;
}

.moon-phases-table-section__select--year {
    width: 124px;
}

.moon-phases-table-section__select--year-only {
    padding: 0 31px;
    width: 194px;

    background:
            url("https://static.todaysmoonphase.com/static/img/icons/icon-calendar.svg") no-repeat left 4px center / 20px 20px,
            url("https://static.todaysmoonphase.com/static/img/icons/icon-caret.svg") no-repeat right 4px center / 20px 20px,
            #ffffff;
}

.moon-phases-table-section__filter-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.moon-phases-table-section__search-btn {
    border: 1px solid #ACACAC;
    border-radius: 3px;
    padding: 0;
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    background-color: #FFFFFF;

    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

@media (hover: hover) and (pointer: fine) {
    #search-btn:hover {
        background-color: #EAEAEA;
    }
}

#search-btn.todaysmoonphase-search-btn--pointerdown {
    background-color: #EAEAEA;
}

.moon-phases-table-section__search-icon {
    width: 18px;
    height: 18px;
}

.moon-phases-table-section__table-note {
    display: none;

    margin-bottom: 6px;

    font-size: 12px;
    font-weight: 500;
    color: #E15757;
}

.moon-phases-table-section__table-area.is-scrollable .moon-phases-table-section__table-note {
    display: block;
}

.moon-phases-table-section__table-gradation {
    position: relative;
}

.moon-phases-table-section__table-gradation::after {
    content: "";

    display: none;

    position: absolute;
    top: 0;
    right: 0;

    width: 28px;
    height: 100%;

    pointer-events: none;

    background: linear-gradient(to right, rgba(255, 255, 255, 0), #ffffff);
}

.moon-phases-table-section__table-area.can-scroll-right .moon-phases-table-section__table-gradation::after {
    display: block;
}

.moon-phases-table-section__table-wrap {
    overflow-x: auto;

    -webkit-overflow-scrolling: touch;
}





/* ================================
   Monthyear – mobile
================================ */

@media (max-width: 1240px) { /* Moon banner responsive width adjustment 1: 1163px + 32px + 26px + 19px = 1240px */
    .moon-banner__summary {
        flex-shrink: 1;
    }
}

@media (max-width: 1170px) { /* Moon banner responsive width adjustment 2: 1062px + 32px + 26px + 50px = 1170px */
    .moon-banner {
        padding-right: 25px;
        padding-left: 25px;
    }
}

@media (max-width: 1120px) { /* Moon banner responsive width adjustment 3: 1062px + 32px + 26px = 1120px */
    .moon-banner {
        flex-wrap: wrap;

        padding-bottom: 22px;
    }

    .moon-banner__summary,
    .moon-banner__details {
        flex: 1 1 0;
    }

    .moon-banner__details {
        min-width: 359px; /* 349px + 10px = 359px, Reduce the extra spacing from 26px to 10px */
    }

    .moon-banner__map-ad-row {
        display: flex;
        align-items: flex-start;
        gap: 29px;

        flex: 0 0 100%;

        min-width:0
    }

    .moon-banner__map-area {
        flex: 1 1 0;

        min-width: 0;
        width: auto;
    }

    .moon-banner__map-wrap {
        width: 100%;
        padding: 0 16px;
    }
}

@media(min-width: 778px) and (max-width: 1120px) {
    .moon-banner__ad {
        display: flex;
        justify-content: center;

        flex: 1 1 0;

        min-width:333px;
        min-height: 250px;

        text-align: center;
    }

    .ad__slot--tablet-middle {
        display:block;
    }
}

@media (max-width: 777px) { /* Moon banner responsive width adjustment 4: 735px + 32px + 10px = 777px */
    .moon-banner {
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap;

        padding-bottom: 25px;
    }

    .moon-banner__summary,
    .moon-banner__details,
    .moon-banner__map-ad-row {
        flex: 0 0 auto;
    }

    .moon-banner__summary {
        min-width: auto;
    }

    .moon-banner__details {
        margin-top: 0;
        min-width: auto;
    }

    .moon-banner__map-ad-row {
        display: block;

        min-width: auto;
    }

    .moon-banner__map-area {
        min-width: auto;
    }

    .moon-banner__map-wrap {
        padding: 0;
    }
}

@media (max-width: 1231px) {
    .moon-phases-table-section__table-area {
        margin-top: 23px;
    }

    .moon-phases-table-section__filter {
        flex-wrap: wrap;

        position: static;

        margin: 0 0 10px;
    }

    .moon-phases-table-section__table-area.is-scrollable .moon-phases-table-section__filter{
        margin: 0 0 20px;
    }
}

@media (max-width: 1231px) {
    .moon-phases-table-section__table--month thead th:first-child {
        padding-right: 11px;
    }
}










.moon-phases-table-section__table {
    min-width: 100%;

    border-collapse: collapse;

    table-layout: auto;
}

.moon-phases-table-section__table th,
.moon-phases-table-section__table td {
    border: 1px solid #C6C6C6;
    padding: 0 11px;
    height: 33px;

    font-size: 14px;
    font-weight: 500;
    color: #444444;

    vertical-align: middle;

    white-space: nowrap;
}

.moon-phases-table-section__table thead th {
    border-bottom: 2px solid #C6C6C6;
    height: 34px;

    font-weight: 700;

    background-color: #E7E9F1;
}

.moon-phases-table-section__table thead th:first-child,
.moon-phases-table-section__table tbody td:first-child {
    width: 1%;
}

.moon-phases-table-section__table--month thead th:first-child {
    padding-right: 42px;
}

.moon-phases-table-section__table--year thead th:first-child {
    padding-right: 73px;
}

.moon-phases-table-section__table tbody td:first-child {
    font-weight: 600;
}

.moon-phases-table-section__table tbody td:first-child a {
    color: #444444;
}

.moon-phases-table-section__table-row {
    cursor: pointer;
}

.moon-phases-table-section__table-row:hover td {
    text-decoration: underline;
}

.moon-phases-table-section__table tbody tr:nth-child(even) {
    background-color: #F7F7F7;
}

.moon-phases-table-section__table thead th:nth-child(1),
.moon-phases-table-section__table thead th:nth-child(2),
.moon-phases-table-section__table thead th:nth-child(3) {
    text-align: left;
}

.moon-phases-table-section__table thead th:nth-child(4),
.moon-phases-table-section__table thead th:nth-child(5) {
    text-align: center;
}

.moon-phases-table-section__table thead th:nth-child(6),
.moon-phases-table-section__table thead th:nth-child(7) {
    text-align: right;
}

.moon-phases-table-section__table tbody td:nth-child(1),
.moon-phases-table-section__table tbody td:nth-child(2),
.moon-phases-table-section__table tbody td:nth-child(3) {
    text-align: right;
}

.moon-phases-table-section__table tbody td:nth-child(4),
.moon-phases-table-section__table tbody td:nth-child(5) {
    text-align: center;
}

.moon-phases-table-section__table tbody td:nth-child(6),
.moon-phases-table-section__table tbody td:nth-child(7) {
    text-align: right;
}










/* 그리고, 첫 행 고정으로 내려오게 할건지 */















.moon-phase-table-section__note {
    margin: 4px 0 0;
    font-size: 12px;
    font-weight: 500;
    color: #777777;
    text-align: left;
}

/* ===== Month Links ===== */
.month-links {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.month-links a {
    font-size: 14px;
    font-weight: 500;
    color: #4E65B5;
    text-decoration: none;
}

.month-links span {
    margin: 0 2px;
    font-size: 14px;
    font-weight: 500;
    color: #A1A1A1;
}





.month-links a:not(:last-child)::after {
    content: "|";
    margin: 0 9px;

    color: #A1A1A1;
}




/* ===== Footer Links ===== */
.moon-phase-table-section__footer-links {
    margin-top: 35px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.moon-phase-table-section__footer-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.moon-phase-table-section__footer-left .moon-phase-table-section__footer-link:first-child {
    margin-bottom: 10px;
}

.moon-phase-table-section__footer-right {
    display: flex;
    justify-content: flex-end;
}

.moon-phase-table-section__footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #4E65B5;
    text-decoration: none;
}

.moon-phase-table-section__footer-link svg {
    width: 23px;
    height: 23px;
    display: block;
    flex: 0 0 auto;
}

.ad--bottom {
    margin-top: 44px;
    margin-bottom: 29px;
}






.monthly-moon-phases__heading {
    font-size: 18px;
    font-weight: 600;
    color: #444444;
    margin-top: 48px;
    margin-bottom: 22px;
}

.monthly-moon-phases__grid {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: space-between;
    row-gap: 17px;
}

.monthly-moon-phases__link {
    font-size: 16px;
    font-weight: 500;
    color: #4E65B5;
    text-decoration: none;
}






.ad--bottom {
    margin-top: 44px;
    margin-bottom: 29px;
}


.ad--bottom .ad__inner {
    min-height: 50px;
}