/* Tenant Configuration Page Styles */

.tenant-config-container {
    padding: 2rem 0;
}

.config-section {
    margin-bottom: 2rem;
}

.config-section .card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.config-section .card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.config-section .card-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.color-preview {
    background-color: #f8f9fa;
    border-radius: 0.375rem;
    padding: 1rem;
}

.color-swatch {
    transition: transform 0.2s ease-in-out;
    cursor: pointer;
}

.color-swatch:hover {
    transform: scale(1.05);
}

.logo-preview {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.logo-placeholder:hover {
    border-color: #6c757d;
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.config-status {
    font-size: 0.875rem;
}

.config-status .bi {
    font-size: 1rem;
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn:focus {
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

/* Color picker styling */
.form-control-color {
    width: 3rem;
    height: 2.375rem;
    padding: 0.375rem;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
}

.form-control-color::-webkit-color-swatch-wrapper {
    padding: 0;
}

.form-control-color::-webkit-color-swatch {
    border: none;
    border-radius: 0.25rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tenant-config-container {
        padding: 1rem 0;
    }
    
    .config-section .card-body {
        padding: 1rem;
    }
    
    .color-preview {
        padding: 0.75rem;
    }
    
    .logo-preview {
        min-height: 120px;
    }
}

/* Loading state */
.loading-spinner {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Success/Error states */
.config-saved {
    animation: fadeInOut 3s ease-in-out;
}

@keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
}

/* Form validation styles */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #198754;
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #198754;
}
