/* HandMan – Tema Motoru Altyapısı */
:root {
    --color-primary: #1a2332;
    --color-primary-hover: #0f1620;
    --color-secondary: #e8730c;
    --color-secondary-hover: #d06508;
    --color-background: #EAEAEA;
    --color-surface: #FFFFFF;
    --color-text-main: #1A1A1A;
    --color-text-muted: #6C757D;
    --color-border: #E0E0E0;
    --color-success: #2d6a4f;

    --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Inter', system-ui, -apple-system, sans-serif;

    --layout-max-width: 1400px;
}

html, body {
    margin: 0;
    padding: 0;
    background-color: var(--color-background);
    color: var(--color-text-main);
    font-family: var(--font-primary);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip !important;
    width: 100% !important;
    max-width: 100% !important;
    scrollbar-gutter: stable;
}

* {
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6, .logo {
    font-family: var(--font-heading);
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
}

/* Blazor error UI */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* ==========================================================================
   GLOBAL PAGE NAVIGATION LOADER & PROGRESS BAR (ECOMMERCE STYLE)
   ========================================================================== */

#global-page-loader {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}

#global-page-loader.active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* 1. Top Fluid Glowing Progress Bar */
.global-loader-progress-track {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 3.5px;
    background: rgba(0, 0, 0, 0.06);
    z-index: 1000000;
    overflow: hidden;
}

.global-loader-progress-shimmer {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #2563eb 20%,
        #e8730c 50%,
        #f59e0b 75%,
        transparent 100%
    );
    box-shadow: 0 0 14px rgba(232, 115, 12, 0.8), 0 0 6px rgba(37, 99, 235, 0.6);
    animation: loaderProgressSlide 1.25s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes loaderProgressSlide {
    0% {
        left: -100%;
        width: 30%;
    }
    50% {
        left: 20%;
        width: 65%;
    }
    100% {
        left: 100%;
        width: 30%;
    }
}

/* 2. Glassmorphic Modal Backdrop */
.global-loader-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.32);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

/* 3. Centered Glassmorphic Card */
.global-loader-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 
        0 24px 50px -10px rgba(15, 23, 42, 0.28),
        0 0 0 1px rgba(0, 0, 0, 0.05),
        0 4px 6px -1px rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    padding: 30px 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    min-width: 200px;
    transform: scale(0.92) translateY(12px);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

#global-page-loader.active .global-loader-card {
    transform: scale(1) translateY(0);
}

/* 4. Dual Ring Spinner */
.global-loader-spinner-wrapper {
    position: relative;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loader-spinner-ring {
    position: absolute;
    border-radius: 50%;
}

.loader-spinner-ring.outer {
    inset: 0;
    border: 3.5px solid rgba(232, 115, 12, 0.16);
    border-top-color: #e8730c;
    border-right-color: #e8730c;
    animation: loaderSpinOuter 0.85s cubic-bezier(0.5, 0.1, 0.4, 0.9) infinite;
}

.loader-spinner-ring.inner {
    inset: 8px;
    border: 3px solid rgba(26, 35, 50, 0.12);
    border-bottom-color: #1a2332;
    border-left-color: #2563eb;
    animation: loaderSpinInner 0.65s linear infinite;
}

.loader-icon {
    font-size: 19px;
    color: #1a2332;
    animation: loaderPulseIcon 1.35s ease-in-out infinite;
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes loaderSpinOuter {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes loaderSpinInner {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes loaderPulseIcon {
    0%, 100% { transform: scale(0.88); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 1; color: #e8730c; }
}

/* 5. Brand Logo Text */
.global-loader-brand {
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: 1.5px;
    color: #1a2332;
    line-height: 1;
}

.global-loader-brand span {
    color: #e8730c;
}

/* 6. Dynamic Loading Text & Typing Dots */
.global-loader-text {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #64748b;
}

.dot-typing {
    display: inline-flex;
    gap: 3.5px;
    align-items: center;
}

.dot-typing .dot {
    width: 4.5px;
    height: 4.5px;
    background-color: #e8730c;
    border-radius: 50%;
    animation: dotPulse 1.2s infinite ease-in-out;
}

.dot-typing .dot:nth-child(2) {
    animation-delay: 0.2s;
    background-color: #2563eb;
}

.dot-typing .dot:nth-child(3) {
    animation-delay: 0.4s;
    background-color: #1a2332;
}

@keyframes dotPulse {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.3;
    }
    40% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* ==========================================================================
   ADMIN CUSTOM POPUP & DELETE CONFIRMATION MODALS (ECOMMERCE STYLE)
   ========================================================================== */

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5) !important;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    padding: 1rem;
    animation: modalFadeIn 0.2s ease-out;
}

.admin-modal {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    box-shadow: 0 25px 60px rgba(15, 23, 42, 0.2), 0 0 20px rgba(232, 115, 12, 0.1) !important;
    border-radius: 20px !important;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 480px;
    max-height: 90vh !important;
    overflow-y: auto !important;
    text-align: center;
    animation: modalSlideUp 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modalSlideUp {
    from { transform: scale(0.92) translateY(12px); opacity: 0; }
    to { transform: scale(1) translateY(0); opacity: 1; }
}

.admin-modal h3, .modal-title-custom {
    font-size: 1.35rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    margin-bottom: 0.5rem !important;
    margin-top: 0.5rem !important;
}

.admin-modal p, .modal-message-custom {
    color: #64748b !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    margin-bottom: 1.75rem !important;
}

.admin-modal-actions {
    display: flex !important;
    gap: 0.75rem !important;
    justify-content: center !important;
    margin-top: 1.5rem !important;
    width: 100% !important;
}

.btn-admin-cancel {
    background-color: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s !important;
    flex: 1;
}

.btn-admin-cancel:hover {
    background-color: #e2e8f0 !important;
    color: #1e293b !important;
}

.btn-admin-danger-confirm {
    background-color: #fee2e2 !important;
    border: 1px solid #fca5a5 !important;
    color: #dc2626 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s !important;
    flex: 1;
}

.btn-admin-danger-confirm:hover {
    background-color: #ef4444 !important;
    color: #ffffff !important;
    border-color: #ef4444 !important;
}

.btn-admin-success-confirm {
    background-color: #ecfdf5 !important;
    border: 1px solid #a7f3d0 !important;
    color: #059669 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s !important;
    flex: 1;
}

.btn-admin-success-confirm:hover {
    background-color: #10b981 !important;
    color: #ffffff !important;
    border-color: #10b981 !important;
}

.btn-admin-warning-confirm {
    background-color: #fffbeb !important;
    border: 1px solid #fde68a !important;
    color: #d97706 !important;
    border-radius: 10px !important;
    padding: 0.65rem 1.5rem !important;
    font-size: 0.92rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    transition: all 0.2s !important;
    flex: 1;
}

.btn-admin-warning-confirm:hover {
    background-color: #f59e0b !important;
    color: #ffffff !important;
    border-color: #f59e0b !important;
}

/* Background scroll lock when any modal/popup is open */
html.modal-open,
body.modal-open,
html:has(.booking-modal-overlay),
body:has(.booking-modal-overlay),
html:has(.lightbox-modal-backdrop),
body:has(.lightbox-modal-backdrop) {
    overflow: hidden !important;
    height: 100% !important;
    touch-action: none !important;
}