/* ==========================================
   HYPERCHEAT THEME - REUSABLE COMPONENTS
   Author: Hypercheat Dev Team
   Created: 2026-01-02
   ========================================== */

/* Button Fill Effect - Tối giản */
.btn-fill {
    --color: #3f4dee;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.25rem;
    cursor: pointer;
    border: 2px solid var(--color);
    transition: all 0.15s ease-out;
    font-size: 13px;
    border-radius: 8px;
    font-weight: 600;
    color: var(--color);
    background: transparent;
    gap: 8px;
    line-height: 1;
}

.btn-fill:hover {
    background: var(--color);
    color: #fff;
}

.btn-fill:active {
    background: var(--color);
    color: #fff;
}

/* Button Sizes */
.btn-fill-sm {
    padding: 0.4rem 0.85rem;
    font-size: 11px;
    border-width: 1.5px;
}

.btn-fill-lg {
    padding: 0.75rem 1.75rem;
    font-size: 15px;
}

/* Button Colors */
.btn-red { --color: #e11d48; }
.btn-slate { --color: #475569; }
.btn-blue { --color: #2563eb; }
.btn-green { --color: #16a34a; }
.btn-purple { --color: #9333ea; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.badge-emerald {
    background: #ecfdf5;
    color: #047857;
}

.badge-blue {
    background: #eff6ff;
    color: #1d4ed8;
}

.badge-amber {
    background: #fef3c7;
    color: #b45309;
}

.badge-red {
    background: #fef2f2;
    color: #be123c;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.badge-success .badge-dot {
    background: #10b981;
}

.badge-warning .badge-dot {
    background: #f59e0b;
}

.badge-danger .badge-dot {
    background: #e11d48;
}
.btn-orange { --color: #ea580c; }

/* Card Styles */
.box-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: none;
}

.box-card-bordered {
    border: 1px solid #e2e8f0;
}

.box-card-interactive {
    cursor: pointer;
}

/* Custom Input Fields */
.custom-input {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    transition: all 0.2s;
    outline: none;
}

.custom-input::placeholder {
    color: #94a3b8;
}

.custom-input:focus {
    background: #fff;
    box-shadow: 0 0 0 2px rgba(63, 77, 238, 0.2);
}

.custom-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom Select */
.custom-select {
    background: #f1f5f9;
    border: none;
    border-radius: 8px;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s;
    outline: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2394a3b8'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.25rem;
    padding-right: 2.5rem;
}

.custom-select:focus {
    background-color: #fff;
    box-shadow: 0 0 0 2px rgba(63, 77, 238, 0.2);
}

/* Custom Checkbox */
.custom-checkbox {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    border: 2px solid #cbd5e1;
    cursor: pointer;
    transition: all 0.2s;
}

.custom-checkbox:checked {
    background-color: #3f4dee;
    border-color: #3f4dee;
}

.custom-checkbox:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(63, 77, 238, 0.2);
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #e2e8f0;
    border-radius: 10px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* Badge Styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    line-height: 1;
}

.badge-primary {
    background-color: rgba(63, 77, 238, 0.1);
    color: #3f4dee;
}

.badge-success {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

.badge-warning {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.badge-danger {
    background-color: rgba(225, 29, 72, 0.1);
    color: #e11d48;
}

.badge-info {
    background-color: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
}

.badge-slate {
    background-color: #f1f5f9;
    color: #475569;
}

/* Status Indicators */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 9999px;
    display: inline-block;
}

.status-dot-success {
    background-color: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.status-dot-warning {
    background-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.status-dot-danger {
    background-color: #e11d48;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.2);
}

.status-dot-info {
    background-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Loading Spinner */
.spinner {
    width: 1.5rem;
    height: 1.5rem;
    border: 3px solid #e2e8f0;
    border-top-color: #3f4dee;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

.spinner-lg {
    width: 2rem;
    height: 2rem;
    border-width: 4px;
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: #1e293b;
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.15s ease-out;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    pointer-events: auto;
}

.toast-success {
    background: #10b981;
}

.toast-error {
    background: #e11d48;
}

.toast-warning {
    background: #f59e0b;
}

.toast-info {
    background: #3b82f6;
}

/* Modal Backdrop */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.4);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-out;
}

.modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

/* Modal Content */
.modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
    max-width: 90%;
    max-height: 90%;
    overflow: auto;
    z-index: 101;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease-out;
}

.modal-content.show {
    opacity: 1;
    visibility: visible;
}

/* Skeleton Loading */
.skeleton {
    background: #f1f5f9;
    border-radius: 0.25rem;
}

/* Responsive Utilities */
@media (max-width: 640px) {
    .box-card {
        border-radius: 0.75rem;
    }
    
    .btn-fill {
        font-size: 12px;
        padding: 0.5rem 1rem;
    }
}
