/* ========================================
   REUSABLE COMPONENTS ( components.css)
======================================== */

/* === BUTTONS === */
.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 10px 24px;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 0; height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-button);
    border: none;
    box-shadow: 0 4px 12px rgba(74, 172, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(74, 172, 254, 0.4);
}

.btn-outline-light {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* === THEME TOGGLE === */
.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--accent-primary);
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: none !important;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    z-index: 9999;
    transition: all var(--transition-base);
}

.theme-toggle:hover {
    transform: scale(1.15) rotate(180deg);
    box-shadow: 0 12px 32px rgba(74, 172, 254, 0.5);
}

.theme-toggle:active {
    transform: scale(0.95);
}

.theme-toggle i {
    transition: transform var(--transition-base);
}

/* === CARDS === */
.card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    transition: all var(--transition-base);
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-md);
}

/* === FORMS === */
.form-control,
.form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 8px;
    padding: 10px 16px;
    transition: all var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--bg-tertiary);
    border-color: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 4px rgba(74, 172, 254, 0.15);
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* === BADGES === */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* === ALERTS === */
.alert {
    border-radius: 12px;
    border: 1px solid;
    backdrop-filter: blur(10px);
}

.alert-success {
    background: rgba(81, 207, 102, 0.1);
    border-color: rgba(81, 207, 102, 0.3);
    color: var(--accent-success);
}

.alert-warning {
    background: rgba(255, 212, 59, 0.1);
    border-color: rgba(255, 212, 59, 0.3);
    color: var(--accent-warning);
}

.alert-danger {
    background: rgba(250, 82, 82, 0.1);
    border-color: rgba(250, 82, 82, 0.3);
    color: var(--accent-danger);
}

/* === LOADING SPINNER === */
.spinner-border {
    border-color: var(--border-color);
    border-right-color: var(--accent-primary);
}

/* === SKELETON LOADING === */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 25%,
        var(--bg-secondary) 50%,
        var(--bg-tertiary) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* === TOOLTIPS === */
.tooltip {
    --bs-tooltip-bg: var(--bg-tertiary);
    --bs-tooltip-color: var(--text-primary);
}

/* === MODALS === */
.modal-content {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
}

.modal-header,
.modal-footer {
    border-color: var(--border-color);
}

/* === DROPDOWNS === */
.dropdown-menu {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.dropdown-item {
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-tertiary);
    color: var(--accent-primary);
}

/* === SCROLLBAR === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-primary);
}

/* === LIGHT MODE ADJUSTMENTS === */
[data-theme="light"] .form-control,
[data-theme="light"] .form-select {
    background: white;
}

[data-theme="light"] .card {
    box-shadow: var(--shadow-sm);
}

[data-theme="light"] .theme-toggle {
    background: var(--accent-secondary);
}