/* =============================================
   LỊCH ÂM – CSS
   Converted from Theme-Mau/lich-am/css/licham.css
   Integrated into tuvi-theme WordPress template
   ============================================= */

:root {
    --la-calendar-bg: linear-gradient(160deg,
            rgba(255, 243, 205, 0),
            rgba(255, 243, 205, 1)), #ffffff;
    --la-calendar-text-color: #362900;
    --la-calendar-btn-bg: #fff3cd;
    --la-border-color: #ffeeb8;
    --la-accent: #e65c00;
    --la-accent-light: #ff9800;
}

/* =============================================
   WRAPPER – isolate from WP theme styles
   ============================================= */
.lich-am-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: 1.5;
    color: #4c4f53;
    background: #f7f7f7;
    padding-bottom: 40px;
}

.lich-am-wrapper * {
    box-sizing: border-box;
}

.lich-am-wrapper br {
    content: "";
    margin: 0 0 8px;
    display: block;
    font-size: 24%;
}

.lich-am-wrapper a {
    text-decoration: none;
}

.lich-am-wrapper p {
    margin: 0 0 10px;
}

/* =============================================
   CONTAINER
   ============================================= */
.la-container {
    width: 1100px;
    max-width: 96%;
    margin: auto;
}

/* =============================================
   CALENDAR WIDGET
   ============================================= */
.la-calendar {
    width: 100%;
    height: 100%;
    overflow: hidden;
    max-width: 100%;
    box-shadow:
        0 0 calc((4 * .225px) + 2px) rgba(0, 0, 0, calc(.11 * (2 - var(--background-luminance, 1)))),
        0 calc(4 * .4px) calc((4 * .9px)) rgba(0, 0, 0, calc(.13 * (2 - var(--background-luminance, 1))));
    position: relative;
    grid-template-columns: 45% 55%;
    grid-gap: 0;
    display: grid;
    background: var(--la-calendar-bg);
    color: var(--la-calendar-text-color);
    margin-bottom: 30px;
    border-radius: 10px;
}

.la-calendar .la-current {
    grid-template-columns: 50% 50%;
    grid-gap: 0;
    display: grid;
    border-left: 1px solid var(--la-border-color);
    background: #fff;
}

.la-calendar .la-current > * > .la-date {
    text-align: center;
    padding: 20px 0;
    height: calc(100% - 41px);
    background: #fff;
}

.la-calendar .la-current .la-solar {
    border-right: 1px solid var(--la-border-color);
    height: 0;
    min-height: 100%;
}

.la-calendar .la-current .la-lunar {
    height: 0;
    min-height: 100%;
}

.la-calendar .la-current [data-p2] {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    padding: 0;
    font-size: 13px;
    margin-top: 30px;
}

.la-calendar .la-current [data-p2] p {
    margin-bottom: 10px;
}

.la-calendar .la-current [data-p2] > :first-child {
    text-align: right;
    padding-right: 10px;
}

.la-calendar .la-current [data-p2] > :last-child {
    text-align: left;
    padding-left: 10px;
}

.la-calendar .la-current > * > .la-head,
.la-nav {
    padding: 8px 10px;
    background: var(--la-calendar-bg);
    text-align: center;
    font-weight: 500;
    border-bottom: 1px solid var(--la-border-color);
}

.la-month-days {
    border: 1px solid #fff;
}

.la-calendar .la-current h2 {
    height: 45px;
    line-height: 38px;
    margin: 0 0 15px;
    font-size: 60px;
    text-shadow:
        rgba(0, 0, 0, .13) 0 .4px .9px,
        rgba(0, 0, 0, .11) 0 0 2.22px;
    color: var(--la-calendar-text-color);
}

.la-calendar .la-current .la-label {
    text-transform: uppercase;
    font-weight: 400;
    text-shadow:
        rgba(0, 0, 0, .13) 0 .4px .9px,
        rgba(0, 0, 0, .11) 0 0 2.22px;
    background-color: var(--la-calendar-btn-bg);
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 13px;
    white-space: nowrap;
    margin-top: 5px;
    display: inline-block;
    color: var(--la-calendar-text-color);
    transition: all .2s;
}

.la-calendar .la-current .la-label:hover {
    background: var(--la-calendar-text-color);
    color: #fff;
}

/* =============================================
   EVENTS / CONTENT PANEL
   ============================================= */
.la-events {
    font-size: 13px;
    text-align: left;
    height: calc(100% - 122px);
    overflow: auto;
    margin-top: 30px;
    padding: 0 0 0 10px;
    line-height: 18px;
}

.la-events::-webkit-scrollbar {
    width: 20px;
}

.la-events::-webkit-scrollbar-track {
    background-color: transparent;
}

.la-events::-webkit-scrollbar-thumb {
    background-color: rgb(181 181 181);
    border-radius: 20px;
    border: 6px solid transparent;
    background-clip: content-box;
}

.la-events::-webkit-scrollbar-thumb:hover,
.la-events:hover::-webkit-scrollbar-thumb {
    background-color: #737373;
}

.la-calendar .la-current .la-events h3 {
    font-size: 13px;
    margin: 0 0 10px;
    height: auto;
    line-height: 1;
}

.la-events table tr td:first-child {
    border-right: 1px solid #ccc;
    padding-right: 5px;
}

.la-events table tr td:last-child {
    border-right: none;
    padding-left: 5px;
}

/* =============================================
   WEEK / CALENDAR GRID
   ============================================= */
.la-week {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.la-week.la-head {
    font-weight: 700;
    background: var(--la-calendar-bg);
    border-bottom: 1px solid var(--la-border-color);
}

.la-week.la-head > div {
    padding: 8px 5px;
    border-top: none;
}

.la-week > div {
    text-align: center;
    border-right: 2px solid #fff;
    border-top: 2px solid #fff;
    font-size: 16px;
    position: relative;
}

.la-week > div.la-today {
    background: var(--la-calendar-btn-bg);
}

.la-week > div:last-child {
    border-right: none;
}

.la-week > div.la-good::before {
    content: "";
    left: 0;
    top: 0;
    position: absolute;
    font-size: 10px;
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 15px solid var(--la-accent-light);
    border-right: 15px solid transparent;
    border-bottom: 0 solid transparent;
    border-left: 0 solid transparent;
}

.la-week > div > a {
    color: #333;
    display: block;
    padding: 6px 5px;
    transition: all .1s;
}

.la-week > div > a:hover {
    background: #fff;
}

.la-week > div > a > * {
    display: block;
    font-weight: 400;
}

.la-week > div > a > .la-s {
    font-weight: 700;
}

.la-week > div > a > .la-l {
    font-size: 13px;
    font-weight: 500;
}

.la-week > div > a > .la-c {
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
}

/* =============================================
   NAV (prev / month label / next)
   ============================================= */
.la-nav {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background: var(--la-calendar-bg);
    color: var(--la-calendar-text-color);
}

.la-nav a {
    color: var(--la-calendar-text-color);
    width: 22px;
    height: 22px;
    border-radius: 15px;
    display: inline-block;
    text-align: center;
    line-height: 22px;
    transition: all .2s;
}

.la-nav a:hover {
    background: var(--la-calendar-text-color);
    color: #fff;
}

.la-nav > :nth-child(1) {
    text-align: left;
}

.la-nav > :nth-child(3) {
    text-align: right;
}

/* =============================================
   GOOD / DANGER LABELS
   ============================================= */
.lich-am-wrapper .la-good-text {
    color: #070;
    font-weight: 500;
}

.lich-am-wrapper .la-danger {
    color: #a20000;
    font-weight: 500;
}

.lich-am-wrapper span.good::before {
    content: "";
    left: 0;
    top: 0;
    position: absolute;
    font-size: 10px;
    display: inline-block;
    width: 0;
    height: 0;
    border-top: 15px solid var(--la-accent-light);
    border-right: 15px solid transparent;
    border-bottom: 0 solid transparent;
    border-left: 0 solid transparent;
}

/* =============================================
   RELATED DAYS NAVIGATION
   ============================================= */
.la-related-days {
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: center;
    margin-bottom: 20px;
}

.la-related-days li {
    display: inline-block;
    margin: 0 10px 10px;
}

.la-related-days li a {
    display: inline-block;
    background: var(--la-calendar-text-color);
    color: #fff;
    border-radius: 25px;
    padding: 3px 15px;
    transition: all .2s;
}

.la-related-days li a:hover {
    background: var(--la-calendar-btn-bg);
    color: var(--la-calendar-text-color);
}

/* =============================================
   PAGE TITLE AREA
   ============================================= */
.la-page-title {
    text-align: center;
    padding: 20px 0 10px;
}

.la-page-title h1 {
    font-size: 20px;
    color: #2c3e50;
    margin: 0 0 6px;
}

.la-page-title h1 a {
    color: inherit;
}

.la-page-title .la-subtitle {
    font-size: 14px;
    color: #555;
}

/* =============================================
   ARTICLE / SEO CONTENT
   ============================================= */
.la-seo-content {
    padding: 20px;
    font-family: Arial, sans-serif;
    background: #fafafa;
    color: #333;
    border-radius: 8px;
    margin-bottom: 20px;
}

.la-seo-content h2 {
    color: #34495e;
    font-size: 20px;
    margin: 20px 0 10px;
}

.la-seo-content h2:first-child {
    margin-top: 0;
}

.la-seo-content p {
    margin-bottom: 10px;
}

.la-seo-content ul {
    padding-left: 20px;
}

.la-seo-content ul li {
    margin-bottom: 8px;
}

/* =============================================
   FAQ SECTION
   ============================================= */
.la-faq-section {
    margin-top: 20px;
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .05);
    margin-bottom: 20px;
}

.la-faq-section h2 {
    color: #34495e;
    font-size: 20px;
    margin: 0 0 15px;
}

.la-faq-container {
    margin-top: 10px;
}

.la-faq-item {
    background: #fff;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.la-faq-question {
    padding: 15px;
    cursor: pointer;
    font-weight: bold;
    background: #f5f5f5;
    transition: background 0.3s;
    user-select: none;
}

.la-faq-question:hover {
    background: #e0e0e0;
}

.la-faq-answer {
    padding: 15px;
    display: none;
    background: #fafafa;
    border-top: 1px solid #ddd;
    animation: la-fadeIn 0.3s ease-in-out;
}

@keyframes la-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =============================================
   TABLE (xtable like)
   ============================================= */
.la-xtable {
    background-color: #fff;
    position: relative;
    overflow: auto;
    width: 100%;
    margin: 20px 0 0;
    border-radius: 10px;
}

.la-xtable table {
    border-collapse: separate;
    border-spacing: 0 3px;
    width: 100%;
    margin-bottom: 10px;
}

.la-xtable td,
.la-xtable th {
    font-weight: 400;
    text-align: left;
    vertical-align: middle;
}

.la-xtable th {
    padding: 15px;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    background-color: #f7f7f7;
    border: none;
}

.la-xtable td {
    color: #333;
    line-height: 1.4;
    background-color: #f7f7f7;
    border: solid 1px transparent;
    border-style: solid none;
    padding: 5px 10px;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 1100px) {
    .la-calendar {
        display: block;
    }

    .la-calendar .la-current {
        border-bottom: 1px solid rgb(214 214 214 / 65%);
        border-left: none;
    }

    .la-calendar .la-current > .la-lunar,
    .la-calendar .la-current > .la-solar {
        height: auto;
        border-right: none;
    }

    .la-nav,
    .la-week > div:first-child {
        border-left: none;
    }

    .la-week > div > a > .la-c {
        display: none;
    }

    .la-calendar .la-current .la-events h3,
    .la-calendar .la-current [data-p2],
    .la-events {
        font-size: 16px;
        line-height: 1.3;
    }
}

@media (max-width: 768px) {
    .la-container .la-top {
        display: block;
    }

    .la-container .la-top .la-calendar {
        margin: 0 auto 20px auto;
    }
}

@media (max-width: 680px) {
    .la-calendar .la-current [data-p2] {
        display: block;
        padding: 0 5px;
    }

    .la-calendar .la-current [data-p2] > :first-child,
    .la-calendar .la-current [data-p2] > :last-child {
        text-align: center;
    }

    .la-calendar .la-current [data-p2] > * {
        padding: 0 10px;
    }

    .la-calendar .la-current .la-label {
        display: block;
        margin-left: 20px;
        margin-right: 20px;
    }

    .la-calendar .la-current .la-solar {
        height: auto;
    }

    .la-related-days {
        margin-bottom: 10px;
    }

    .la-related-days li {
        margin-bottom: 10px;
    }
}

@media (max-width: 520px) {
    .la-calendar .la-current {
        display: block;
    }

    .la-calendar .la-current .la-solar {
        height: auto;
        border-left: none;
    }

    .la-calendar .la-current [data-p2] {
        display: grid;
    }

    .la-calendar .la-current .la-label {
        display: inline-block;
        margin-left: auto;
        margin-right: auto;
    }

    .la-calendar .la-current [data-p2] > :first-child {
        text-align: right;
    }
}
