/* Kymon Bazi Auspicious Date & Hour styles */

.kymot-wrapper {
    max-width: 100%;
    margin: 0 auto;
    font-family: 'Be Vietnam Pro', sans-serif;
    color: #334155;
}

/* Tabs */
.kymot-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border-bottom: 2px solid #ebd9c5;
    padding-bottom: 10px;
    margin-bottom: 25px;
    justify-content: center;
}
.kymot-tab-btn {
    background: #fdfbf7;
    border: 1px solid #ebd9c5;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 600;
    color: #7c2d12;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
}
.kymot-tab-btn:hover {
    background: #fffbeb;
    color: #b91c1c;
}
.kymot-tab-btn.active {
    background: #8b0000;
    border-color: #8b0000;
    color: #ffffff;
}

/* Form layouts */
.kymot-panel {
    display: none;
}
.kymot-panel.active {
    display: block;
}

.kymot-form-card {
    background: #ffffff;
    border: 1px solid #ebd9c5;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 15px rgba(166, 124, 82, 0.04);
    margin-bottom: 30px;
}

.kymot-form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.kymot-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.kymot-form-group label {
    font-size: 13.5px;
    font-weight: 700;
    color: #1e293b;
}
.kymot-form-group input, 
.kymot-form-group select {
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
}
.kymot-form-group input:focus, 
.kymot-form-group select:focus {
    border-color: #8b0000;
    box-shadow: 0 0 0 2px rgba(139, 0, 0, 0.1);
}

.kymot-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: linear-gradient(135deg, #b91c1c 0%, #7f1d1d 100%);
    color: #ffffff !important;
    font-weight: 700;
    font-size: 14.5px;
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(185, 28, 28, 0.2);
    font-family: inherit;
    text-transform: uppercase;
}
.kymot-submit-btn:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(185, 28, 28, 0.25);
}

/* Paywall / Locked Box */
.kymot-paywall-box {
    background: #fdfbf7;
    border: 1px dashed #a67c52;
    border-radius: 12px;
    padding: 35px 20px;
    text-align: center;
    max-width: 600px;
    margin: 20px auto;
}
.kymot-paywall-box .lock-icon {
    font-size: 40px;
    margin-bottom: 15px;
}
.kymot-paywall-box h4 {
    color: #b91c1c;
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 10px;
}
.kymot-paywall-box p {
    color: #64748b;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Results section */
.kymot-results-title {
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    color: #8b0000;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 1px solid #ebd9c5;
    padding-bottom: 10px;
}

.kymot-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.kymot-result-card {
    background: #ffffff;
    border: 1px solid #ebd9c5;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
}
.kymot-result-card:hover {
    transform: translateY(-2px);
    border-color: #8b0000;
    box-shadow: 0 6px 18px rgba(139, 0, 0, 0.05);
}

.kymot-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fdfbf7;
    border-bottom: 1px solid #ebd9c5;
    cursor: pointer;
    flex-wrap: wrap;
    gap: 10px;
}

.kymot-card-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-grow: 1;
}
.kymot-card-date {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}
.kymot-card-lunar {
    font-size: 12.5px;
    color: #64748b;
    background: #ebd9c5;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.kymot-card-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.kymot-score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fef3c7;
    color: #d97706;
    border: 1.5px solid #fde68a;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 800;
    white-space: nowrap;
}
.kymot-score-badge.high-score {
    background: #dcfce7;
    color: #15803d;
    border-color: #bbf7d0;
}
.kymot-score-badge.mid-score {
    background: #fef3c7;
    color: #d97706;
    border-color: #fde68a;
}
.kymot-score-badge.low-score {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.kymot-toggle-icon {
    font-size: 16px;
    color: #64748b;
    transition: transform 0.2s;
}
.kymot-result-card.expanded .kymot-toggle-icon {
    transform: rotate(180deg);
}

.kymot-card-body {
    display: none;
    padding: 20px;
    border-top: 1px solid #ebd9c5;
    background: #faf8f5;
}
.kymot-result-card.expanded .kymot-card-body {
    display: block;
}

.kymot-analysis-section {
    margin-bottom: 15px;
}
.kymot-analysis-section h5 {
    font-size: 13.5px;
    font-weight: 700;
    color: #8b0000;
    margin: 0 0 8px 0;
}
.kymot-analysis-section p {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
    margin: 0;
    text-align: justify;
}

/* Hourly timeline for wealth day selection */
.kymot-hours-timeline {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.kymot-hour-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.kymot-hour-name {
    font-weight: 600;
    font-size: 13px;
    color: #1e293b;
}
.kymot-hour-score {
    font-size: 12px;
    font-weight: 700;
    background: #f1f5f9;
    color: #475569;
    padding: 2px 6px;
    border-radius: 4px;
}
.kymot-hour-score.good {
    background: #dcfce7;
    color: #15803d;
}

/* responsive */
@media (max-width: 600px) {
    .kymot-tabs {
        flex-direction: column;
        border-bottom: none;
    }
    .kymot-tab-btn {
        border-radius: 8px;
        border-bottom: 1px solid #ebd9c5;
        text-align: center;
    }
    .kymot-card-header {
        padding: 12px 14px;
    }
    .kymot-card-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
}

/* Custom Dropdown styling to prevent browser defaults and text truncation */
.kymot-form-group select {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    line-height: 22px;
    padding: 10px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
    background: #ffffff;
    color: #334155;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Recommendation Box (Top 3 Suggestions) */
.kymot-recommendations-box {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(217, 119, 6, 0.06);
}
.kymot-recs-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    color: #b45309;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-align: center;
    letter-spacing: 0.5px;
}
.kymot-recs-grid {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kymot-rec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #fef3c7;
    border-radius: 8px;
    padding: 12px 16px;
    transition: transform 0.2s ease;
}
.kymot-rec-item:hover {
    transform: translateX(4px);
}
.kymot-rec-medal {
    font-size: 13.5px;
    min-width: 140px;
}
.kymot-rec-details {
    flex-grow: 1;
    font-size: 14px;
    color: #334155;
    padding: 0 15px;
}
.kymot-rec-canchi {
    font-size: 12px;
    color: #dc2626;
    font-weight: 600;
}
.kymot-rec-score {
    background: #dcfce7;
    color: #15803d;
    font-size: 15px;
    font-weight: 800;
    padding: 4px 12px;
    border-radius: 20px;
    border: 1.5px solid #bbf7d0;
}

/* Day-by-Day Breakdown Nesting Layout */
.kymot-day-breakdown {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.kymot-day-card {
    background: #ffffff;
    border: 1.5px solid #ebd9c5;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.01);
    transition: border-color 0.2s ease;
}
.kymot-day-card.expanded {
    border-color: #a67c52;
}
.kymot-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    background: #fdfbf7;
    cursor: pointer;
    border-bottom: 1px solid #ebd9c5;
}
.kymot-day-header:hover {
    background: #faf6f0;
}
.kymot-day-title {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}
.kymot-day-date {
    font-size: 16.5px;
    font-weight: 700;
    color: #7c2d12;
}
.kymot-day-canchi-badge {
    font-size: 12.5px;
    background: #8b0000;
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.kymot-day-body {
    padding: 20px;
    background: #fcfaf7;
}

/* Hours list inside a day */
.kymot-hours-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.kymot-hour-card {
    border: 1px solid #ebd9c5;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
}
.kymot-hour-card.expanded {
    border-color: #8b0000;
    box-shadow: 0 4px 12px rgba(139, 0, 0, 0.05);
}
.kymot-hour-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
    background: #ffffff;
}
.kymot-hour-header:hover {
    background: #fffbeb;
}
.kymot-hour-title {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex-grow: 1;
}
.kymot-hour-name {
    font-size: 14.5px;
    font-weight: 700;
    color: #1e293b;
}
.kymot-hour-canchi-text {
    font-size: 12.5px;
    color: #b91c1c;
    font-weight: 600;
    background: #fef2f2;
    padding: 2px 6px;
    border-radius: 4px;
}
.kymot-rating-badge {
    font-size: 11.5px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
}
.badge-dai-cat {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}
.badge-thu-cat {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}
.badge-binh-hoa {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}
.badge-hung {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fca5a5;
}
.badge-nhat-xung {
    background: #fee2e2;
    color: #991b1b;
    border: 1.5px solid #ef4444;
    font-weight: 800;
}
.kymot-day-card.is-nhat-xung {
    border: 1.5px solid #fca5a5;
    background: #fffdfd;
}
.kymot-score-badge.mid-score {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #bae6fd;
}
.kymot-score-badge.low-score {
    background: #fee2e2;
    color: #b91c1c;
    border-color: #fca5a5;
}

.kymot-hour-body {
    padding: 16px;
    border-top: 1px solid #ebd9c5;
    background: #faf8f5;
}

/* 7 Analysis Grid inside an hour card */
.kymot-analysis-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.kymot-analysis-item {
    background: #ffffff;
    border: 1px solid #ebd9c5;
    border-radius: 6px;
    padding: 14px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.01);
}
.kymot-analysis-item-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #8b0000;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.kymot-analysis-item-content {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

/* Ngũ hành badges */
.kymot-nh-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 6px;
    margin-bottom: 6px;
}
.kymot-nh-badge.wood { background: #dcfce7; color: #15803d; }
.kymot-nh-badge.fire { background: #fee2e2; color: #b91c1c; }
.kymot-nh-badge.earth { background: #fef3c7; color: #b45309; }
.kymot-nh-badge.metal { background: #f1f5f9; color: #475569; }
.kymot-nh-badge.water { background: #e0f2fe; color: #0369a1; }

.kymot-collapsible-body {
    display: none;
}

/* responsive nested layout */
@media (max-width: 600px) {
    .kymot-day-header {
        padding: 12px 14px;
    }
    .kymot-day-title {
        gap: 6px;
    }
    .kymot-hour-header {
        padding: 10px 12px;
    }
    .kymot-hour-title {
        gap: 8px;
    }
    .kymot-rec-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .kymot-rec-score {
        align-self: flex-end;
    }
}

