/**
 * BaZi Calculator Styles
 *
 * @package Lertech_BaZi_Career_Advisor
 */

/* Reset and Base */
.bazi-calculator-wrapper {
    font-family: 'Microsoft YaHei', 'Arial', sans-serif;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    color: #333;
}

.bazi-calculator-wrapper * {
    box-sizing: border-box;
}

/* Header */
.bazi-header {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}

.bazi-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #E87A5D;
}

.bazi-header p {
    font-size: 1.1em;
    color: #666;
}

/* Main Content Grid */
.bazi-main-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

/* Cards */
.bazi-form-card,
.bazi-info-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.bazi-form-card h2,
.bazi-info-card h2 {
    color: #E87A5D;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #E87A5D;
    font-size: 1.3em;
}

/* Form Styles */
.bazi-form-group {
    margin-bottom: 18px;
}

.bazi-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.bazi-form-group input,
.bazi-form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.bazi-form-group input:focus,
.bazi-form-group select:focus {
    outline: none;
    border-color: #E87A5D;
    box-shadow: 0 0 0 3px rgba(232, 122, 93, 0.1);
}

.bazi-form-group small {
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 12px;
}

.bazi-form-group.bazi-disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Checkbox Group */
.bazi-checkbox-group {
    display: flex;
    align-items: center;
    margin-bottom: 18px;
}

.bazi-checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.bazi-checkbox-group label {
    margin-bottom: 0;
    font-weight: 500;
    cursor: pointer;
}

/* Gender Group */
.bazi-gender-group {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.bazi-gender-option {
    display: flex;
    align-items: center;
}

.bazi-gender-option input[type="radio"] {
    width: auto;
    margin-right: 8px;
    cursor: pointer;
}

.bazi-gender-option label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}

/* Buttons */
.bazi-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 25px;
}

.bazi-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bazi-btn-calculate {
    background: linear-gradient(135deg, #F4A261 0%, #E87A5D 100%);
    color: #fff;
    grid-column: 1 / -1;
}

.bazi-btn-calculate:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(232, 122, 93, 0.4);
}

.bazi-btn-clear {
    background: #f44336;
    color: #fff;
}

.bazi-btn-clear:hover {
    background: #da190b;
}

.bazi-btn-career {
    background: #FF6B6B;
    color: #fff;
    margin-top: 20px;
}

.bazi-btn-career:hover {
    background: #ff5252;
}

.bazi-btn-career:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Error Message */
.bazi-error {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    border-left: 4px solid #c62828;
    display: none;
    font-weight: 500;
}

.bazi-error:not(:empty) {
    display: block;
}

/* Info Card Styles */
.bazi-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.bazi-notice p {
    margin: 0;
    color: #856404;
    font-size: 14px;
    line-height: 1.6;
}

.bazi-features h4 {
    color: #333;
    margin-bottom: 10px;
}

.bazi-features ul {
    margin: 0;
    padding-left: 20px;
    color: #666;
    font-size: 14px;
    line-height: 1.8;
}

/* Loading */
.bazi-loading {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.bazi-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #E87A5D;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: bazi-spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes bazi-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Section */
.bazi-result {
    display: none;
    margin-top: 30px;
    padding: 25px;
    background: #f8f9fa;
    border-radius: 12px;
}

.bazi-result > h2 {
    color: #333;
    margin: 0 0 20px 0;
    text-align: center;
}

/* Report Sections */
.bazi-section {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-bottom: 25px;
}

.bazi-section-title {
    background: #E87A5D;
    color: #fff;
    padding: 12px 15px;
    margin: -25px -25px 20px -25px;
    border-radius: 12px 12px 0 0;
    font-size: 1.2em;
}

/* Basic Info */
.bazi-info {
    background: #fff;
    border-radius: 8px;
}

.bazi-info-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.bazi-info-row:last-child {
    border-bottom: none;
}

.bazi-info-label {
    color: #666;
}

.bazi-info-value {
    color: #333;
    font-weight: bold;
}

.bazi-main-structure {
    background: #fff3cd;
    padding: 12px;
    border-radius: 4px;
    border-left: 4px solid #ffc107;
    margin-top: 10px;
}

.bazi-main-structure .bazi-info-label,
.bazi-main-structure .bazi-info-value {
    color: #856404;
    font-weight: bold;
}

.bazi-main-structure .bazi-info-value {
    font-size: 16px;
}

/* Special Stars */
.bazi-special-stars {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.bazi-special-stars h4 {
    color: #333;
    margin-bottom: 10px;
}

.bazi-stars-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    font-size: 14px;
}

.bazi-star-item {
    padding: 8px;
    background: #f9f9f9;
    border-radius: 4px;
}

/* Pillars Table */
.bazi-pillars {
    overflow-x: auto;
}

.bazi-toggle-deity {
    margin-bottom: 15px;
}

.bazi-toggle-deity label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.bazi-toggle-deity input {
    margin-right: 8px;
}

.bazi-pillars-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #ddd;
    background: #fff;
}

.bazi-pillars-table th,
.bazi-pillars-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.bazi-pillars-table th {
    background: #E87A5D;
    color: #fff;
    font-weight: 600;
}

.bazi-row-label {
    background: #f0f0f0;
    font-weight: bold;
    text-align: left !important;
    padding: 10px !important;
}

.bazi-pillar-cell {
    padding: 15px 10px !important;
}

.bazi-char {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.bazi-deity {
    font-size: 12px;
    color: #666;
}

.bazi-hidden-cell {
    font-size: 12px;
    line-height: 1.8;
}

/* Ten Deities Chart */
.bazi-deities-chart {
    max-width: 1000px;
    margin: 0 auto;
}

.bazi-deities-table {
    width: 100%;
    border-collapse: collapse;
}

.bazi-deities-table tr {
    border-bottom: 1px solid #f0f0f0;
}

.bazi-deity-name {
    padding: 10px;
    width: 20%;
    text-align: right;
    font-weight: 500;
    color: #333;
}

.bazi-deity-bar-cell {
    padding: 10px;
    width: 35%;
}

.bazi-deity-bar-bg {
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
    height: 24px;
    position: relative;
}

.bazi-deity-bar {
    height: 100%;
    transition: width 0.3s ease;
}

.bazi-deity-score {
    position: absolute;
    right: 8px;
    top: 2px;
    font-size: 12px;
    font-weight: bold;
    color: #333;
}

.bazi-deity-desc {
    padding: 10px 12px;
    width: 45%;
    font-size: 12px;
    color: #555;
    line-height: 1.5;
}

.bazi-deities-note {
    margin-top: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

/* Five Elements */
.bazi-elements-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#bazi-radar-chart {
    max-width: 400px;
    margin: 0 auto 20px;
    display: block;
}

.bazi-elements-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.bazi-elements-table th,
.bazi-elements-table td {
    padding: 10px;
    text-align: center;
    border: 1px solid #ddd;
}

.bazi-elements-table th {
    background: #E87A5D;
    color: #fff;
}

.bazi-element-name {
    font-size: 18px;
    font-weight: bold;
}

.bazi-element-desc {
    text-align: left;
    font-size: 13px;
    color: #555;
}

/* Luck Pillars Grid */
.bazi-dayun-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.bazi-dayun-item {
    border: 1px solid #ddd;
    padding: 15px;
    text-align: center;
    border-radius: 4px;
}

.bazi-dayun-ganzhi {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 8px;
}

.bazi-dayun-branch {
    color: #666;
}

.bazi-dayun-cycle {
    font-size: 12px;
    color: #888;
    margin-bottom: 5px;
}

.bazi-dayun-age {
    font-size: 14px;
    font-weight: 600;
    color: #E87A5D;
}

.bazi-dayun-element {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* Career Advice Section */
.bazi-career-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #E87A5D;
}

.bazi-career-loading {
    display: none;
    text-align: center;
    padding: 30px;
}

.bazi-career-content {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.bazi-career-content h4 {
    color: #E87A5D;
    margin: 0 0 12px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.bazi-career-analysis,
.bazi-career-insights,
.bazi-career-strengths,
.bazi-career-challenges,
.bazi-career-recommendations {
    margin-bottom: 20px;
}

.bazi-career-analysis p,
.bazi-career-insights p {
    color: #555;
    line-height: 1.8;
}

.bazi-advice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.bazi-strength-item {
    background: #d4edda;
    padding: 10px;
    border-radius: 4px;
    color: #155724;
    font-size: 13px;
}

.bazi-challenge-item {
    background: #fff3cd;
    padding: 10px;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
}

.bazi-career-recommendations ul {
    background: #e7f3ff;
    padding: 15px 15px 15px 35px;
    border-left: 3px solid #2196F3;
    border-radius: 4px;
    color: #1976D2;
    margin: 0;
}

.bazi-career-recommendations li {
    margin-bottom: 8px;
}

.bazi-career-error {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    padding: 15px;
    border-radius: 4px;
    color: #721c24;
}

/* Responsive */
@media (max-width: 1200px) {
    .bazi-dayun-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .bazi-main-content {
        grid-template-columns: 1fr;
    }

    .bazi-dayun-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .bazi-stars-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .bazi-calculator-wrapper {
        padding: 10px;
    }

    .bazi-header h1 {
        font-size: 1.5em;
    }

    .bazi-form-card,
    .bazi-info-card,
    .bazi-section {
        padding: 15px;
    }

    .bazi-section-title {
        margin: -15px -15px 15px -15px;
        padding: 10px;
        font-size: 1em;
    }

    .bazi-btn-group {
        grid-template-columns: 1fr;
    }

    .bazi-dayun-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bazi-pillars-table th,
    .bazi-pillars-table td {
        padding: 8px;
        font-size: 0.9em;
    }

    .bazi-char {
        font-size: 18px;
    }

    .bazi-deities-table {
        font-size: 0.9em;
    }

    .bazi-deity-name {
        width: 30%;
    }

    .bazi-deity-desc {
        display: none;
    }

    .bazi-deity-bar-cell {
        width: 70%;
    }

    .bazi-advice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .bazi-dayun-grid {
        grid-template-columns: 1fr 1fr;
    }

    .bazi-dayun-ganzhi {
        font-size: 18px;
    }
}

/* Print Styles */
@media print {
    .bazi-calculator-wrapper {
        padding: 0;
    }

    .bazi-form-card,
    .bazi-btn-group,
    .bazi-btn-career,
    .bazi-career-section button {
        display: none;
    }

    .bazi-section {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }
}
