/* ===== TK Lô Xiên 2-3 Styles ===== */

/* Container chính */
.tkloxien23-container {
}

/* Selector section */
.selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: linear-gradient(135deg, #ea6666 0%, #952929 100%);
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 20px;
}

.filter {
    display: flex;
    gap: 10px;
    flex-direction: column;
}

.filter-1 {
    display: flex;
    gap: 10px;
    align-items: stretch;
    width:100%;
}

/* Flex layout cho form controls */
.d-flex {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* Title styling */
.title-bold {
    font-weight: 600;
    color: #ffffff;
}

/* Select boxes */
select {
    background: #ffffff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    color: #2c3e50;
    min-width: 150px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

select:hover {
    border-color: #667eea;
    transform: translateY(-1px);
}

/* Radio buttons section */
.radio-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.radio-list div {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    min-width: auto;
}

.radio-list div:hover {
    background: rgba(255, 255, 255, 1);
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.radio-list input[type="radio"] {
    width: 18px;
    height: 18px;
    accent-color: #667eea;
    cursor: pointer;
}

.radio-list label {
    font-weight: 500;
    font-size: 14px;
    color: #2c3e50;
    cursor: pointer;
    margin: 0;
}

.radio-list div:has(input:checked) {
    background: #667eea;
    border-color: #667eea;
    color: white;
}

.radio-list div:has(input:checked) label {
    color: white;
}

/* Button styling */
.button-view-rs button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(238, 90, 36, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.button-view-rs button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 90, 36, 0.4);
    background: #fff;
    color: var(--color-primary);
}

.button-view-rs button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(238, 90, 36, 0.3);
}

/* Results section */
#result {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e8ecef;
    min-height: 200px;
    overflow: hidden;
}

/* Results table styling */
.rs {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.title-rs {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 18px 25px;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rs-table {
    width: 100%;
    overflow: hidden;
}

.rs-table .grid {
    display: grid;
    grid-template-columns: 1fr 1fr 2fr;
    gap: 0;
}

#thead-rs {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

#thead-rs div {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
}

.rs-table .grid div {
    padding: 6px;
    text-align: center;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.2s ease;
}

.rs-table .grid div:last-child {
    border-right: none;
}

.rs-table .grid:hover div {
    background-color: #f8f9fa;
}

/* Text colors */
.text-red {
    color: #e74c3c;
    font-weight: 600;
}

.text-blue {
    color: #3498db;
    font-weight: 600;
}

/* Loading animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
    color: #667eea;
    font-size: 16px;
}

.loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .filter-1 {flex-wrap: wrap;}
    .d-flex {
        width: 100%;
    }
    
    select {
        min-width: 100%;
        width: 100%;
    }
    
    .radio-list {
        gap: 8px;
        display: flex;
        flex-direction: row;
        align-items: center;
        flex-wrap: nowrap;
    }
    
    .radio-list div {
        width: 100%;
        justify-content: center;
    }
    
    .button-view-rs button {
        width: 100%;
        padding: 18px;
        font-size: 18px;
    }
        
    .rs-table .grid div {
        padding: 6px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
        
    .title-rs {
        font-size: 16px;
        padding: 15px 20px;
    }
}

/* Animation cho các elements */
.tkloxien23-container {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover effects cho results */
#result:empty::before {
    content: 'Chọn các tùy chọn và nhấn "Xem kết quả" để hiển thị dữ liệu';
    display: block;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Custom scrollbar */
.rs-table::-webkit-scrollbar {
    height: 8px;
}

.rs-table::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.rs-table::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 4px;
}

.rs-table::-webkit-scrollbar-thumb:hover {
    background: #5a67d8;
}