/**
 * Frontend Styles for WP Ultimate CSV Importer Custom
 */

/* Rate Sheet Styles */
.rate-sheet {
    margin: 20px 0;
}

.rate-sheet .accordion-item {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    margin-bottom: 10px;
}

.rate-sheet .accordion-header {
    margin-bottom: 0;
}

.rate-sheet .accordion-button {
    background-color: #f8f9fa;
    border: none;
    padding: 1rem 1.25rem;
    font-weight: 500;
    color: #212529;
    text-align: left;
    width: 100%;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.rate-sheet .accordion-button:not(.collapsed) {
    background-color: #e7f1ff;
    color: #0c63e4;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.125);
}

.rate-sheet .accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: transparent;
}

.rate-sheet .accordion-button::after {
    content: '';
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23212529'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 1.25rem;
    background-position: center;
    width: 1.25rem;
    height: 1.25rem;
    transition: transform 0.2s ease-in-out;
}

.rate-sheet .accordion-button:not(.collapsed)::after {
    transform: rotate(-180deg);
}

.rate-sheet .accordion-collapse {
    border: none;
}

.rate-sheet .accordion-body {
    padding: 1rem 1.25rem;
    background-color: #fff;
}

/* Rate Item Styles */
.rate-item {
    border: 1px solid #e9ecef;
    border-radius: 0.375rem;
    margin-bottom: 15px;
    padding: 20px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.15s ease-in-out;
}

.rate-item:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.rate-item .rate-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
}

.rate-item .rate-header h4 {
    margin: 0;
    color: #212529;
    font-size: 1.25rem;
    font-weight: 600;
}

.rate-item .rate-details {
    font-size: 0.9rem;
}

.rate-item .rate-details .row {
    margin-bottom: 10px;
}

.rate-item .rate-details .col-md-3 {
    padding: 5px 10px;
    border-right: 1px solid #e9ecef;
}

.rate-item .rate-details .col-md-3:last-child {
    border-right: none;
}

.rate-item .rate-details strong {
    color: #495057;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
}

.rate-item .rate-details .row:last-child .col-md-3 {
    border-right: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rate-sheet .accordion-button {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .rate-item {
        padding: 15px;
    }
    
    .rate-item .rate-details .col-md-3 {
        border-right: none;
        border-bottom: 1px solid #e9ecef;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }
    
    .rate-item .rate-details .col-md-3:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }
}

@media (max-width: 576px) {
    .rate-item .rate-details .row {
        margin-bottom: 0;
    }
    
    .rate-item .rate-details .col-md-3 {
        width: 100%;
        margin-bottom: 15px;
        padding: 10px;
        background: #f8f9fa;
        border-radius: 0.25rem;
    }
}

/* Loading States */
.wuci-loading {
    position: relative;
    opacity: 0.6;
}

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

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

/* Error States */
.wuci-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 10px;
    border-radius: 0.375rem;
    margin: 10px 0;
}

.wuci-no-data {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    background: #f8f9fa;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

.wuci-no-data .dashicons {
    font-size: 48px;
    color: #adb5bd;
    margin-bottom: 15px;
}

/* Utility Classes */
.wuci-text-center {
    text-align: center;
}

.wuci-text-right {
    text-align: right;
}

.wuci-mb-3 {
    margin-bottom: 1rem;
}

.wuci-mt-3 {
    margin-top: 1rem;
}

.wuci-p-3 {
    padding: 1rem;
}

.wuci-bg-light {
    background-color: #f8f9fa;
}

.wuci-border {
    border: 1px solid #dee2e6;
}

.wuci-rounded {
    border-radius: 0.375rem;
}

/* Animation Classes */
.wuci-fade-in {
    animation: wuci-fade-in 0.3s ease-in-out;
}

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

.wuci-slide-down {
    animation: wuci-slide-down 0.3s ease-in-out;
}

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

/* Print Styles */
@media print {
    .rate-sheet .accordion-button {
        background: none !important;
        color: #000 !important;
        border: 1px solid #000;
    }
    
    .rate-sheet .accordion-collapse {
        display: block !important;
    }
    
    .rate-item {
        break-inside: avoid;
        margin-bottom: 20px;
    }
    
    .rate-item .rate-details .col-md-3 {
        border: 1px solid #000;
        padding: 5px;
    }
}
