/* Reusable UI Components */

/* Buttons */
.btn {
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
    text-decoration: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-primary {
    background: var(--primary, #3b82f6);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark, #2563eb);
}

.btn-secondary {
    background: var(--bg-secondary, rgba(255, 255, 255, 0.1));
    color: var(--text-main, #333);
    border: 1px solid var(--border-color, rgba(0, 0, 0, 0.1));
}

.btn-secondary:hover {
    background: var(--bg-hover, rgba(0, 0, 0, 0.05));
}

.btn-danger {
    background: var(--red-text, #ef4444);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: var(--bg-card, #ffffff);
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transform: translateY(20px);
    transition: all 0.3s ease;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: translateY(0);
}

/* Modal Sizes */
.modal-sm {
    max-width: 400px;
}

.modal-md {
    max-width: 600px;
}

.modal-lg {
    max-width: 800px;
}

.modal-xl {
    max-width: 1000px;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-main, #111827);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary, #6b7280);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--bg-hover, #f3f4f6);
    color: var(--text-main, #111827);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    color: var(--text-main, #374151);
    line-height: 1.5;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color, #e5e7eb);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    background: var(--bg-secondary, #f9fafb);
}

/* Dark Mode Support (if applicable variables are set) */
.dark .modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
}