/* Components CSS for Pal AI */

/* Modal Styles */
.modal-overlay {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.dark .modal-content {
    background: rgba(26, 26, 26, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

/* Form Styles */
.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 14px;
    transition: all 0.2s ease;
}

.dark .form-input {
    border-color: #4b5563;
    background: #1f2937;
    color: white;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 6px;
    color: #374151;
}

.dark .form-label {
    color: #d1d5db;
}

.form-error {
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

.form-hint {
    color: #6b7280;
    font-size: 12px;
    margin-top: 4px;
}

.dark .form-hint {
    color: #9ca3af;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: #3b82f6;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.dark .btn-secondary {
    background: #4b5563;
    color: #d1d5db;
}

.btn-secondary:hover:not(:disabled) {
    background: #e5e7eb;
    transform: translateY(-1px);
}

.dark .btn-secondary:hover:not(:disabled) {
    background: #6b7280;
}

.btn-danger {
    background: #ef4444;
    color: white;
}

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 12px 24px;
    font-size: 16px;
}

/* Card Styles */
.card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.dark .card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.dark .card-header {
    border-bottom-color: #2a2a2a;
}

.card-body {
    padding: 24px;
}

.card-footer {
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
}

.dark .card-footer {
    border-top-color: #2a2a2a;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
}

.badge-primary {
    background: #dbeafe;
    color: #1e40af;
}

.dark .badge-primary {
    background: #1e3a8a;
    color: #93c5fd;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.dark .badge-success {
    background: #14532d;
    color: #86efac;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.dark .badge-warning {
    background: #78350f;
    color: #fcd34d;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.dark .badge-danger {
    background: #7f1d1d;
    color: #fca5a5;
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 120px;
    background-color: #1f2937;
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -60px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Avatar Styles */
.avatar {
    border-radius: 50%;
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-md {
    width: 40px;
    height: 40px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 80px;
    height: 80px;
}

/* Divider */
.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

.dark .divider {
    background: #2a2a2a;
}

/* Status Indicator */
.status-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-online {
    background: #10b981;
}

.status-offline {
    background: #6b7280;
}

.status-busy {
    background: #f59e0b;
}

/* Progress Bar */
.progress {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.dark .progress {
    background: #4b5563;
}

.progress-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Alert Styles */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border: 1px solid;
}

.alert-info {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.dark .alert-info {
    background: #1e3a8a;
    border-color: #3b82f6;
    color: #93c5fd;
}

.alert-success {
    background: #dcfce7;
    border-color: #86efac;
    color: #166534;
}

.dark .alert-success {
    background: #14532d;
    border-color: #10b981;
    color: #86efac;
}

.alert-warning {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

.dark .alert-warning {
    background: #78350f;
    border-color: #f59e0b;
    color: #fcd34d;
}

.alert-error {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

.dark .alert-error {
    background: #7f1d1d;
    border-color: #ef4444;
    color: #fca5a5;
}

/* RTL Support for Components */
[dir="rtl"] .btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .tooltip .tooltip-text {
    left: auto;
    right: 50%;
    margin-left: 0;
    margin-right: -60px;
}

[dir="rtl"] .status-indicator {
    margin-right: 0;
    margin-left: 8px;
}

/* Responsive Components */
@media (max-width: 640px) {
    .card-header,
    .card-body,
    .card-footer {
        padding: 16px;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .tooltip .tooltip-text {
        width: 100px;
        margin-left: -50px;
    }
    
    [dir="rtl"] .tooltip .tooltip-text {
        margin-left: 0;
        margin-right: -50px;
    }
} 