/* ====================================================================
   MAZE SYSTEMS - Utilities CSS v1.0
   Estilos para loading overlays, toasts, spinners
   ==================================================================== */

/* ═══════════════════════════════════════════════════════════════════
   LOADING OVERLAY
   ═══════════════════════════════════════════════════════════════════ */

.maze-loading-overlay {
    position: absolute;
    inset: 0;
    background: rgba(5, 5, 4, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    z-index: 100;
    border-radius: inherit;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.maze-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 138, 61, 0.2);
    border-top-color: var(--primary, #FF8A3D);
    border-radius: 50%;
    animation: maze-spin 0.8s linear infinite;
}

.maze-loading-text {
    color: var(--text-secondary, #a0a0a0);
    font-size: 0.9rem;
    margin: 0;
}

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

/* ═══════════════════════════════════════════════════════════════════
   BUTTON LOADING STATE
   ═══════════════════════════════════════════════════════════════════ */

.maze-btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.maze-btn-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: maze-spin 0.6s linear infinite;
    vertical-align: middle;
}

/* ═══════════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════════════════════════════ */

.maze-toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-width: 400px;
    width: calc(100% - 2rem);
    pointer-events: none;
}

.maze-toast {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: var(--bg-card, #0c0a08);
    border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
}

.maze-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.maze-toast-hide {
    transform: translateX(100%);
    opacity: 0;
}

.maze-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.875rem;
    font-weight: 700;
}

.maze-toast-message {
    flex: 1;
    color: var(--text-primary, #fff);
    font-size: 0.9rem;
    line-height: 1.4;
}

.maze-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted, #666);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s;
}

.maze-toast-close:hover {
    color: var(--text-primary, #fff);
}

/* Toast Types */
.maze-toast-success {
    border-left: 3px solid var(--accent-success, #4caf50);
}

.maze-toast-success .maze-toast-icon {
    background: rgba(76, 175, 80, 0.2);
    color: var(--accent-success, #4caf50);
}

.maze-toast-error {
    border-left: 3px solid var(--accent-danger, #f44336);
}

.maze-toast-error .maze-toast-icon {
    background: rgba(244, 67, 54, 0.2);
    color: var(--accent-danger, #f44336);
}

.maze-toast-warning {
    border-left: 3px solid var(--accent-warning, #ff9800);
}

.maze-toast-warning .maze-toast-icon {
    background: rgba(255, 152, 0, 0.2);
    color: var(--accent-warning, #ff9800);
}

.maze-toast-info {
    border-left: 3px solid var(--info, #2196f3);
}

.maze-toast-info .maze-toast-icon {
    background: rgba(33, 150, 243, 0.2);
    color: var(--info, #2196f3);
}

/* ═══════════════════════════════════════════════════════════════════
   SKELETON LOADING
   ═══════════════════════════════════════════════════════════════════ */

.maze-skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.03) 0%,
        rgba(255, 255, 255, 0.06) 50%,
        rgba(255, 255, 255, 0.03) 100%
    );
    background-size: 200% 100%;
    animation: maze-skeleton-shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm, 8px);
}

.maze-skeleton-text {
    height: 1em;
    margin-bottom: 0.5em;
}

.maze-skeleton-text:last-child {
    width: 70%;
}

.maze-skeleton-circle {
    border-radius: 50%;
}

.maze-skeleton-card {
    height: 200px;
}

@keyframes maze-skeleton-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ═══════════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════════ */

@media (max-width: 480px) {
    .maze-toast-container {
        top: auto;
        bottom: 1rem;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-width: none;
    }

    .maze-toast {
        transform: translateY(100%);
    }

    .maze-toast-show {
        transform: translateY(0);
    }

    .maze-toast-hide {
        transform: translateY(100%);
    }
}

/* ═══════════════════════════════════════════════════════════════════
   UTILITY CLASSES - Inline Style Replacements
   ═══════════════════════════════════════════════════════════════════ */

/* Display */
.d-none { display: none !important; }
.d-flex { display: flex; }
.d-block { display: block; }

/* Text Colors */
.text-muted { color: #888; }
.text-light { color: #ccc; }
.text-accent { color: var(--accent-primary, #FF8A3D); }
.text-danger { color: #f44336; }
.text-success { color: #4caf50; }
.text-white { color: #fff; }

/* Font Sizes */
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fs-14 { font-size: 14px; }
.fs-18 { font-size: 18px; }
.fs-20 { font-size: 20px; }
.fs-24 { font-size: 24px; }
.fs-32 { font-size: 32px; }

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }

/* Spacing - Margins */
.mt-0 { margin-top: 0; }
.mt-5 { margin-top: 5px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: 5px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.m-0 { margin: 0; }

/* Spacing - Padding */
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-30 { padding: 30px; }
.pl-20 { padding-left: 20px; }

/* Width */
.w-full { width: 100%; }

/* Flex */
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-5 { gap: 5px; }
.gap-8 { gap: 8px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.flex-1 { flex: 1; }

/* Misc */
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.letter-spacing-wide { letter-spacing: 8px; }

/* Additional Utilities */
.text-dim { color: #666; }
.mt-4px { margin-top: 4px; }
.mr-8 { margin-right: 8px; }
.mb-8 { margin-bottom: 8px; }
.p-24 { padding: 24px; }
.cursor-pointer { cursor: pointer; }

/* Settings/Admin Panel Components */
.settings-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    padding: 15px;
}
.settings-badge {
    background: rgba(255,138,61,0.2);
    color: var(--accent-primary, #FF8A3D);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.settings-input {
    width: 100%;
    padding: 12px;
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
}
.settings-code {
    display: block;
    background: rgba(0,0,0,0.3);
    padding: 10px;
    border-radius: 6px;
    color: var(--accent-primary, #FF8A3D);
    font-size: 11px;
}
.settings-pill-btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    background: transparent;
    color: #888;
    cursor: pointer;
}
.settings-ghost-btn {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #ccc;
    cursor: pointer;
}
.settings-icon-btn {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 4px;
}
.settings-section-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-section-body { padding: 24px; }
.settings-flex-row {
    display: flex;
    padding: 8px 12px;
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}
.settings-label {
    display: block;
    margin-bottom: 8px;
    color: #ccc;
    font-size: 14px;
}
.settings-hint {
    color: #888;
    font-size: 12px;
    margin: 0 0 10px;
}
.th-compact { padding: 12px 8px; }
.th-upper { text-transform: uppercase; }

/* Additional referenced classes */
.justify-end { justify-content: flex-end; }
.grid-span-2 { grid-column: span 2; }

/* Icon badges with custom backgrounds */
.icon-badge-green { background: rgba(34,197,94,0.2); color: #22c55e; }
.icon-badge-accent { background: rgba(255,138,61,0.2); }

/* Specific component overrides */
.modal-md { max-width: 600px; }
.proration-preview { background: rgba(255,138,61,0.1); border: 1px solid rgba(255,138,61,0.3); border-radius: 10px; }
.divider-top { padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); }
.border-top-subtle { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 15px; }
.text-discord { color: #5865F2; }
.text-warning { color: #f59e0b; }
.text-warning-orange { color: #ff9800; }
.input-code { letter-spacing: 8px; }
.min-h-150 { min-height: 150px; }
.fs-15r { font-size: 1.5rem; }
.text-dim-dark { color: #333; }
.text-dim-mid { color: #555; }
