/* ==========================================================================
   📐 CANVAS TOOLS & GRID SETTINGS (Tuval Araçları, Izgara & Tam Ekran)
   css/canvas-tools.css
   ========================================================================== */

/* ==================== 1. GRID SETTINGS POPOVER ==================== */
.grid-settings-popover {
    position: absolute !important;
    bottom: 60px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 330px !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 10px !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.06) !important;
    z-index: 10000 !important;
    padding: 12px 14px !important;
    font-family: 'ClassicAmpersand', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    animation: gridPopoverFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

body[data-theme="dark"] .grid-settings-popover {
    background: #12122A !important;
    border: 1px solid rgba(108, 92, 231, 0.35) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7), 0 0 20px rgba(108, 92, 231, 0.15) !important;
}

@keyframes gridPopoverFadeIn {
    from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.96); }
    to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.popover-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    margin-bottom: 10px !important;
}

body[data-theme="dark"] .popover-header {
    border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

.popover-title-wrap {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    font-weight: 700 !important;
    font-size: 12.5px !important;
    color: #0f172a !important;
}

body[data-theme="dark"] .popover-title-wrap {
    color: #f1f5f9 !important;
}

.popover-title-wrap i {
    color: #0284c7 !important;
    font-size: 13px !important;
}

body[data-theme="dark"] .popover-title-wrap i {
    color: #38bdf8 !important;
}

.popover-close-btn {
    background: transparent !important;
    border: none !important;
    color: #64748b !important;
    cursor: pointer !important;
    font-size: 13px !important;
    padding: 2px 7px !important;
    border-radius: 4px !important;
    transition: all 0.15s ease !important;
    line-height: 1 !important;
}

.popover-close-btn:hover {
    color: #ef4444 !important;
    background: #fee2e2 !important;
}

body[data-theme="dark"] .popover-close-btn {
    color: #94a3b8 !important;
}

body[data-theme="dark"] .popover-close-btn:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.25) !important;
}

.popover-section {
    margin-bottom: 10px !important;
}

.popover-label {
    display: block !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #475569 !important;
    margin-bottom: 5px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

body[data-theme="dark"] .popover-label {
    color: #94a3b8 !important;
}

.popover-sublabel {
    font-size: 11px !important;
    color: #1e293b !important;
    font-weight: 600 !important;
}

body[data-theme="dark"] .popover-sublabel {
    color: #cbd5e1 !important;
}

.popover-val-badge {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    padding: 1px 6px !important;
    border-radius: 4px !important;
}

body[data-theme="dark"] .popover-val-badge {
    color: #38bdf8 !important;
    background: rgba(56, 189, 248, 0.15) !important;
    border-color: rgba(56, 189, 248, 0.3) !important;
}

.popover-pill-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 4px !important;
}

.popover-pill-btn {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%) !important;
    border: 1px solid #cbd5e1 !important;
    color: #1e293b !important;
    padding: 4px 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 5px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
}

.popover-pill-btn i {
    color: #475569 !important;
    font-size: 11px !important;
    transition: color 0.15s ease !important;
}

.popover-pill-btn:hover {
    border-color: #0284c7 !important;
    color: #0284c7 !important;
    background: #f0f9ff !important;
}

.popover-pill-btn:hover i {
    color: #0284c7 !important;
}

.popover-pill-btn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(2, 132, 199, 0.28) !important;
}

.popover-pill-btn.active i {
    color: #ffffff !important;
}

body[data-theme="dark"] .popover-pill-btn {
    background: rgba(30, 41, 59, 0.7) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    color: #cbd5e1 !important;
}

body[data-theme="dark"] .popover-pill-btn i {
    color: #94a3b8 !important;
}

body[data-theme="dark"] .popover-pill-btn:hover {
    background: rgba(56, 189, 248, 0.2) !important;
    border-color: rgba(56, 189, 248, 0.4) !important;
    color: #fff !important;
}

body[data-theme="dark"] .popover-pill-btn:hover i {
    color: #fff !important;
}

body[data-theme="dark"] .popover-pill-btn.active {
    background: #38bdf8 !important;
    color: #0f172a !important;
    border-color: #38bdf8 !important;
}

body[data-theme="dark"] .popover-pill-btn.active i {
    color: #0f172a !important;
}

.popover-row-2 {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
}

.popover-input-group input[type="range"] {
    width: 100% !important;
    height: 4px !important;
    border-radius: 2px !important;
    background: #e2e8f0 !important;
    outline: none !important;
    accent-color: #0284c7 !important;
    cursor: pointer !important;
}

body[data-theme="dark"] .popover-input-group input[type="range"] {
    background: #334155 !important;
    accent-color: #38bdf8 !important;
}

.grid-color-dot {
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    transition: all 0.15s ease !important;
    box-sizing: border-box !important;
}

.grid-color-dot[data-color="#ffffff"] {
    border: 1.5px solid #cbd5e1 !important;
}

.grid-color-dot:hover {
    transform: scale(1.18) !important;
}

.grid-color-dot.active {
    box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #0284c7 !important;
    transform: scale(1.1) !important;
}

body[data-theme="dark"] .grid-color-dot.active {
    box-shadow: 0 0 0 2px #12122A, 0 0 0 4px #38bdf8 !important;
}


/* ==================== 2. CANVAS FULLSCREEN / THEATER MODE ==================== */
body.canvas-fullscreen-mode {
    overflow: hidden !important;
}

body.canvas-fullscreen-mode .top-bar,
body.canvas-fullscreen-mode .main-nav,
body.canvas-fullscreen-mode .tab-content,
body.canvas-fullscreen-mode .sidebar,
body.canvas-fullscreen-mode .left-panel {
    display: none !important;
}

body.canvas-fullscreen-mode .preview-area {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    z-index: 99999 !important;
    margin: 0 !important;
    padding: 10px !important;
    background: #f8fafc !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
}

body[data-theme="dark"].canvas-fullscreen-mode .preview-area {
    background: #0A0A1A !important;
}

body.canvas-fullscreen-mode #canvasBottomDock {
    z-index: 100001 !important;
    position: fixed !important;
    bottom: 12px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
}

body.canvas-fullscreen-mode #canvasHint {
    position: fixed !important;
    top: 10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    z-index: 100000 !important;
    background: rgba(15, 23, 42, 0.8) !important;
    color: #f8fafc !important;
    padding: 3px 14px !important;
    border-radius: 20px !important;
    backdrop-filter: blur(8px) !important;
    font-size: 11px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

/* Dock fullscreen butonu aktif durumu */
#dockFullscreenBtn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 6px rgba(2, 132, 199, 0.4) !important;
}

#dockFullscreenBtn.active i {
    color: #ffffff !important;
}
/* Dock fit canvas butonu aktif durumu */
#dockFitCanvasBtn.active {
    background: #0284c7 !important;
    color: #ffffff !important;
    border-color: #0284c7 !important;
    box-shadow: 0 0 6px rgba(2, 132, 199, 0.4) !important;
}

#dockFitCanvasBtn.active i {
    color: #ffffff !important;
}

/* ==========================================================================
   Masaüstü Kullanım Önerisi Banner'ı (Mobilde Şık Üst Bilgilendirme)
   ========================================================================== */
.mobile-experience-banner {
    display: none;
}
@media (max-width: 768px) {
    .mobile-experience-banner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: linear-gradient(90deg, #0284c7 0%, #2563eb 100%);
        color: #ffffff;
        padding: 7px 12px;
        font-size: 11px;
        font-weight: 500;
        z-index: 1000;
        position: relative;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        gap: 8px;
    }
    .mobile-experience-banner .mob-banner-content {
        display: flex;
        align-items: center;
        gap: 7px;
        flex: 1;
        line-height: 1.35;
    }
    .mobile-experience-banner .mob-banner-content i {
        font-size: 13px;
        color: #e0f2fe;
        flex-shrink: 0;
    }
    .mobile-experience-banner .mob-banner-close {
        background: transparent;
        border: none;
        color: rgba(255, 255, 255, 0.85);
        font-size: 17px;
        cursor: pointer;
        padding: 0 4px;
        line-height: 1;
        flex-shrink: 0;
    }
}
