/* TITLE: assets/css/components.css */

/* ==========================================================================
   1. MASTER COMPONENT VARIABLES (Preserved from original)
   ========================================================================== */
:root {
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   2. BUTTON SYSTEM (Preserved from original)
   ========================================================================== */
.btn-attractive {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    gap: 8px;
    width: 100%;
}

.btn-primary { 
    background: var(--primary) !important; 
    color: #ffffff !important; 
    box-shadow: 0 4px 14px 0 rgba(37, 99, 235, 0.39); 
}
.btn-primary:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.23); 
}
.btn-primary:active { 
    transform: scale(0.97); 
}

/* ==========================================================================
   3. ACTION CARDS (Preserved from original)
   ========================================================================== */
.action-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}
.action-card i { 
    font-size: 1.8rem; 
    font-style: normal; 
}
.action-card:hover { 
    border-color: var(--primary); 
    transform: translateY(-3px); 
}
.action-card:active {
    transform: scale(0.96);
}

/* ==========================================================================
   4. MASTER FLOATING TOAST SYSTEM (Glassmorphic + Timer Bar)
   ========================================================================== */
#reflo-toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    width: 92%;
    max-width: 440px;
}

@media (min-width: 768px) {
    #reflo-toast-container {
        left: auto;
        right: 25px;
        transform: none;
        width: 380px;
    }
}

.reflo-toast-pill {
    pointer-events: auto;
    position: relative;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    border-radius: 22px;
    padding: 16px 18px 18px;
    color: #ffffff;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5), 0 0 20px rgba(37, 99, 235, 0.15);
    animation: toastPopIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

[data-theme="light"] .reflo-toast-pill {
    background: rgba(255, 255, 255, 0.94);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15), 0 4px 15px rgba(0,0,0,0.05);
}

@keyframes toastPopIn {
    from {
        opacity: 0;
        transform: translateY(-25px) scale(0.92);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.reflo-toast-pill.toast-leaving {
    opacity: 0;
    transform: translateY(-20px) scale(0.95);
}

.toast-icon-badge {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 900;
    flex-shrink: 0;
}

.toast-success .toast-icon-badge { background: rgba(34, 197, 94, 0.2); color: #22c55e; }
.toast-error   .toast-icon-badge { background: rgba(239, 68, 68, 0.2); color: #ef4444; }
.toast-warning .toast-icon-badge { background: rgba(245, 158, 11, 0.2); color: #f59e0b; }
.toast-info    .toast-icon-badge { background: rgba(37, 99, 235, 0.2); color: #3b82f6; }

.toast-success { border-left: 4px solid #22c55e !important; }
.toast-error   { border-left: 4px solid #ef4444 !important; }
.toast-warning { border-left: 4px solid #f59e0b !important; }
.toast-info    { border-left: 4px solid #3b82f6 !important; }

.toast-body-text {
    flex: 1;
    text-align: left;
}

.toast-headline {
    display: block;
    font-size: 0.92rem;
    font-weight: 900;
    letter-spacing: -0.3px;
    margin-bottom: 2px;
}

.toast-desc-text {
    font-size: 0.82rem;
    line-height: 1.4;
    opacity: 0.85;
    margin: 0;
    font-weight: 600;
}

.toast-dismiss-x {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    opacity: 0.5;
    padding: 2px 6px;
    transition: opacity 0.15s;
}
.toast-dismiss-x:hover { opacity: 1; }

.toast-timer-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.35;
    width: 100%;
    animation: toastCountdown 4s linear forwards;
}

@keyframes toastCountdown {
    from { width: 100%; }
    to { width: 0%; }
}

/* ==========================================================================
   5. PASSWORD SHOW/HIDE TOGGLE (Issue 2)
   ========================================================================== */
.password-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.btn-toggle-pwd {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
    outline: none;
    user-select: none;
}
.btn-toggle-pwd:hover { opacity: 1; }

/* ==========================================================================
   6. LIGHTBOX MODAL (Preserved from original)
   ========================================================================== */
.image-lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.88);
    backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.image-lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-img-box {
    max-width: 90vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.image-lightbox-overlay.active .lightbox-img-box {
    transform: scale(1);
}

.lightbox-img-box img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 24px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    background: #ffffff;
}

.lightbox-close-btn {
    position: absolute;
    top: -16px;
    right: -16px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #334155;
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: transform 0.15s;
    z-index: 10;
}
.lightbox-close-btn:active { transform: scale(0.9); }

.lightbox-caption {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    font-weight: 800;
    margin-top: 15px;
    text-align: center;
}
/* ==========================================================================
   7. footer tag
   ========================================================================== */
.reflo-powered-tag {
    font-size: 0.75rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
    font-weight: 600;
    text-align: center;
    margin: 25px auto 15px;
    letter-spacing: 0.3px;
    opacity: 0.85;
    user-select: none;
    display: block;
}

.reflo-powered-tag strong {
    font-style: normal;
    font-weight: 800;
}
/* Center Container on Top */
.top-center-portal-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

/* Red Log Out Button for Regular Users */
.btn-top-logout {
    background-color: #ef4444 !important; /* Bold Red */
    color: #ffffff !important;
    border: none;
    border-radius: 12px;
    padding: 10px 24px;
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.3px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
    transition: transform 0.15s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-top-logout:hover {
    background-color: #dc2626 !important;
    transform: translateY(-1px);
}

.btn-top-logout:active {
    transform: scale(0.97);
}

/* Admin Portal Button for digitalbellohorlar@gmail.com */
.btn-top-admin {
    background-color: #0f172a !important; /* Dark Slate Admin Theme */
    color: #38bdf8 !important; /* Bright Cyan Highlight */
    border: 1.5px solid #38bdf8;
    border-radius: 12px;
    padding: 10px 22px;
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: 0.5px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.25);
    transition: transform 0.15s ease, background-color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.btn-top-admin:hover {
    background-color: #1e293b !important;
    transform: translateY(-1px);
}
/* ==========================================================================
   HIGH-RES ZOOM CLARITY ENGINE (Fixes Mobile Blur & Re-Samples 4K Details)
   ========================================================================== */
.zoomable-img {
    /* 1. Stop the phone from freezing a low-res 300px snapshot */
    will-change: auto !important;

    /* 2. Force the graphics engine to re-sample high-resolution details */
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: high-quality !important;

    /* 3. Keep small text razor-sharp when scaling */
    -webkit-backface-visibility: hidden !important;
    backface-visibility: hidden !important;
    transform-style: flat !important;
}