/* Plugin Phong Thủy HKBT Styles - Version 3.0 */

.pthkbt-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

/* Title Style matching original */
.pthkbt-title {
    background: #00AA43;
    color: white;
    text-align: center;
    margin: 0 0 15px 0;  /* Bỏ margin âm */
    padding: 15px;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border-radius: 8px;  /* Bo tròn cả 4 góc */
}

.pthkbt-container h3 {
    color: #D2691E;
    margin-top: 25px;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

/* Form Styles - Compact Design */
.pthkbt-form {
    background: #FFF8E7;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 8px; /* Reduced spacing */
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #8B4513;
    font-size: 14px;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #D2B48C;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s;
    background: white;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #00AA43;
    box-shadow: 0 0 0 2px rgba(0,170,67,0.1);
}

/* Radio Group - Better Design */
.radio-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 20px;
    border: 1px solid #D2B48C;
    border-radius: 20px;
    transition: all 0.3s;
    background: white;
    position: relative;
}

.radio-label:hover {
    border-color: #00AA43;
    background: rgba(0,170,67,0.03);
}

.radio-label input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.radio-label input[type="radio"]:checked ~ .radio-custom {
    background: #00AA43;
    border-color: #00AA43;
}

.radio-label input[type="radio"]:checked ~ .radio-custom::after {
    opacity: 1;
}

.radio-label input[type="radio"]:checked ~ .radio-text {
    color: #00AA43;
    font-weight: 600;
}

.radio-custom {
    width: 16px;
    height: 16px;
    border: 2px solid #D2B48C;
    border-radius: 50%;
    margin-right: 6px;
    position: relative;
    transition: all 0.3s;
}

.radio-custom::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.radio-text {
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

/* Button with green color */
.btn-calculate {
    background: #00AA43;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s;
    display: block;
    margin: 18px auto 0;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-calculate:hover {
    background: #009638;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0,170,67,0.25);
}

/* Result Styles - Professional */
.pthkbt-result {
    background: white;
    padding: 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    animation: fadeIn 0.4s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Result Header */
.result-header {
    background: linear-gradient(135deg, #00AA43 0%, #00C851 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

.result-header h3 {
    color: white;
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

/* Result Content */
.result-content {
    padding: 20px;
}

/* User Info Card */
.user-info-card {
    background: #F8F9FA;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border-left: 4px solid #00AA43;
}

.user-info-card .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.user-info-card .info-row:last-child {
    margin-bottom: 0;
}

.user-info-card .info-label {
    color: #666;
    font-size: 13px;
}

.user-info-card .info-value {
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

/* Cung Menh Card */
.cung-menh-card {
    background: linear-gradient(135deg, #FFF8DC 0%, #FFE4B5 100%);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    border: 1px solid #DEB887;
    position: relative;
}

.cung-menh-card h4 {
    color: #8B4513;
    margin: 0 0 15px 0;
    font-size: 22px;
    font-weight: 700;
}

.cung-menh-details {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.cung-menh-item {
    text-align: center;
}

.cung-menh-item .label {
    color: #666;
    font-size: 12px;
    margin-bottom: 4px;
}

.cung-menh-item .value {
    color: #8B4513;
    font-size: 16px;
    font-weight: 600;
}

/* Direction Status */
.direction-status {
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    position: relative;
}

.direction-status.good {
    background: linear-gradient(135deg, #D4EDDA 0%, #C3E6CB 100%);
    color: #155724;
    border: 1px solid #C3E6CB;
}

.direction-status.bad {
    background: linear-gradient(135deg, #F8D7DA 0%, #F5C6CB 100%);
    color: #721C24;
    border: 1px solid #F5C6CB;
}

.direction-status .status-icon {
    font-size: 20px;
    margin-right: 8px;
}

.direction-status .direction-name {
    font-size: 18px;
}

.direction-status .direction-type {
    display: block;
    font-size: 14px;
    margin-top: 5px;
    font-weight: normal;
}

/* Compass Container */
.compass-section {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: #F8F9FA;
    border-radius: 8px;
}

.compass-wrapper {
    position: relative;
    display: inline-block;
    max-width: 350px;
    margin: 0 auto;
}

.compass-image {
    width: 100%;
    height: auto;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.compass-arrow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 45%;
    background: linear-gradient(to top, transparent, #FF0000);
    transform-origin: bottom center;
    transition: transform 1s ease;
}

.compass-arrow::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -6px;
    width: 0;
    height: 0;
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-bottom: 12px solid #FF0000;
}

.compass-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    background: #FFD700;
    border: 2px solid #FF0000;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Direction Analysis */
.direction-analysis {
    background: white;
    padding: 20px;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    margin-bottom: 20px;
}

.direction-analysis h4 {
    color: #D2691E;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.direction-analysis p {
    color: #555;
    line-height: 1.6;
    font-size: 14px;
    margin-bottom: 10px;
}

/* Eight Directions Table */
.eight-directions {
    background: #F8F9FA;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.eight-directions h4 {
    color: #8B4513;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

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

.direction-badge {
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
    font-size: 13px;
    font-weight: 500;
    transition: transform 0.2s;
}

.direction-badge:hover {
    transform: scale(1.05);
}

.direction-badge.cat {
    background: linear-gradient(135deg, #28A745 0%, #20C997 100%);
    color: white;
}

.direction-badge.hung {
    background: linear-gradient(135deg, #DC3545 0%, #C82333 100%);
    color: white;
}

.direction-badge .dir-name {
    display: block;
    font-weight: 600;
    margin-bottom: 2px;
}

.direction-badge .dir-type {
    display: block;
    font-size: 11px;
    opacity: 0.9;
}

/* Additional Advice Section */
.additional-advice {
    background: #FFF9F0;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #FFE0B2;
}

.additional-advice h4 {
    color: #8B4513;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
}

.advice-cards {
    display: grid;
    gap: 12px;
}

.advice-card {
    background: white;
    padding: 12px;
    border-radius: 6px;
    border-left: 3px solid #00AA43;
}

.advice-card h5 {
    color: #00AA43;
    margin: 0 0 6px 0;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.advice-card h5 .icon {
    margin-right: 6px;
    font-size: 16px;
}

.advice-card p {
    color: #666;
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

/* Other Factors */
.other-factors {
    background: #F5F5F5;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.other-factors h4 {
    color: #8B4513;
    margin: 0 0 12px 0;
    font-size: 16px;
    font-weight: 600;
}

.other-factors ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.other-factors li {
    color: #666;
    font-size: 13px;
    line-height: 1.6;
    padding-left: 20px;
    margin-bottom: 6px;
    position: relative;
}

.other-factors li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #00AA43;
    font-weight: bold;
}

/* Print Button */
.print-section {
    text-align: center;
    padding: 15px 0;
}

.btn-print {
    padding: 8px 24px;
    background: #6C757D;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-print:hover {
    background: #5A6268;
    transform: translateY(-1px);
}

/* Info Section */
.pthkbt-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.pthkbt-info ul {
    margin-left: 20px;
    margin-top: 10px;
}

.pthkbt-info li {
    margin-bottom: 8px;
    line-height: 1.6;
    font-size: 14px;
    color: #555;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00AA43;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 600px) {
    .pthkbt-container {
        padding: 15px;
    }
    
    .pthkbt-form {
        padding: 15px;
    }
    
    .directions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cung-menh-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .user-info-card .info-row {
        flex-direction: column;
    }
    
    .compass-wrapper {
        max-width: 280px;
    }
}

/* Print Styles */
@media print {
    .pthkbt-form,
    .btn-calculate,
    .btn-print,
    .pthkbt-info,
    .print-section {
        display: none !important;
    }
    
    .pthkbt-result {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .compass-section {
        page-break-inside: avoid;
    }
}