/* Theme Settings Styles */

.theme-card {
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.theme-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.theme-card.active {
    border-color: #007bff;
    box-shadow: 0 0 15px rgba(0,123,255,0.3);
}

.theme-preview {
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.theme-preview::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: 20px;
    height: 4px;
    background: #007bff;
    border-radius: 2px;
}

.theme-preview::after {
    content: '';
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    height: 2px;
    background: #6c757d;
    border-radius: 1px;
}

.color-swatch {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin: 2px;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.accessibility-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.accessibility-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.accessibility-toggle input:checked + .slider {
    background-color: #007bff;
}

.accessibility-toggle input:checked + .slider:before {
    transform: translateX(26px);
}

.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.theme-option {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.theme-option:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0,123,255,0.15);
}

.theme-option.selected {
    border-color: #007bff;
    background: #f8f9ff;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.theme-option h5 {
    margin: 10px 0;
    color: #495057;
}

.theme-option p {
    color: #6c757d;
    font-size: 0.9rem;
    margin: 0;
}

.custom-theme-builder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    margin-top: 20px;
}

.custom-theme-builder h4 {
    margin-bottom: 15px;
}

.custom-theme-builder p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.btn-customize {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-customize:hover {
    background: white;
    color: #667eea;
    text-decoration: none;
}

.settings-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h5 {
    color: #495057;
    border-bottom: 2px solid #007bff;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.import-export-section {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    background: #f8f9fa;
}

.import-section, .export-section {
    padding: 15px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.import-section h6, .export-section h6 {
    color: #495057;
    margin-bottom: 10px;
}

.import-section p, .export-section p {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
}

.file-input-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.file-input-label:hover {
    background: #0056b3;
}

.current-theme-display {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.current-theme-display h4 {
    margin: 0 0 10px 0;
}

.current-theme-display p {
    margin: 0;
    opacity: 0.9;
}

.theme-stats {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
}

.theme-stat {
    text-align: center;
}

.theme-stat .stat-number {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.theme-stat .stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.accessibility-panel {
    background: #e7f3ff;
    border: 1px solid #b3d9ff;
    border-radius: 8px;
    padding: 20px;
}

.accessibility-panel h5 {
    color: #004085;
    margin-bottom: 15px;
}

.accessibility-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #d1ecf1;
}

.accessibility-option:last-child {
    border-bottom: none;
}

.accessibility-option label {
    margin: 0;
    font-weight: 500;
    color: #004085;
}

.accessibility-toggle {
    margin-left: 10px;
}

.preview-modal .modal-dialog {
    max-width: 90vw;
}

.preview-modal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

.theme-suggestions {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.theme-suggestions h6 {
    color: #856404;
    margin-bottom: 10px;
}

.theme-suggestions .suggestion-item {
    background: white;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    border-left: 3px solid #ffc107;
}

.theme-suggestions .suggestion-item:last-child {
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .theme-grid {
        grid-template-columns: 1fr;
    }

    .theme-card {
        margin-bottom: 15px;
    }

    .custom-theme-builder {
        padding: 20px;
    }

    .theme-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* Animation for theme transitions */
.theme-transition {
    animation: themeFadeIn 0.5s ease-in-out;
}

@keyframes themeFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading states */
.theme-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.theme-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #007bff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}