/* MTA Elektrik — includes/ux/assets/d7-polish.css | F1 birleştirme */

/* ─── parça D7 ─── */
/* ═══════════════════════════════════════════════════════════════
   MTA D7 — UX Çila
   ═══════════════════════════════════════════════════════════════ */

/* ───────────────────────────────────────────────
   SKIP LINK (accessibility)
   ─────────────────────────────────────────────── */

.mta-d7-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 99999;
    padding: 12px 20px;
    background: var(--mta-color-primary, #6366f1);
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0 0 8px 0;
}

.mta-d7-skip-link:focus {
    left: 0;
    outline: 3px solid #fbbf24;
    outline-offset: 2px;
}

/* ───────────────────────────────────────────────
   TOAST CONTAINER + TOAST
   ─────────────────────────────────────────────── */

.mta-d7-toast-container {
    position: fixed;
    z-index: 99998;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 360px;
    width: calc(100% - 32px);
}

.mta-d7-toast-top-right {
    top: 16px;
    right: 16px;
}

.mta-d7-toast-top-center {
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
}

.mta-d7-toast-bottom-right {
    bottom: 16px;
    right: 16px;
}

.mta-d7-toast-bottom-center {
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
}

.mta-d7-toast {
    background: var(--mta-surface-base, #ffffff);
    border: 1px solid var(--mta-border-soft, #e2e8f0);
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: var(--mta-ink-strong, #0f172a);
    animation: mta-d7-toast-in 250ms ease-out;
    border-left-width: 4px;
}

.mta-d7-toast.is-leaving {
    animation: mta-d7-toast-out 200ms ease-in forwards;
}

@keyframes mta-d7-toast-in {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0); opacity: 1; }
}

@keyframes mta-d7-toast-out {
    from { transform: translateX(0); opacity: 1; }
    to   { transform: translateX(100%); opacity: 0; }
}

.mta-d7-toast-success { border-left-color: var(--mta-color-success, #16a34a); background: #f0fdf4; }
.mta-d7-toast-error   { border-left-color: var(--mta-color-danger, #dc2626); background: #fee2e2; }
.mta-d7-toast-warning { border-left-color: var(--mta-color-warning, #f59e0b); background: #fffbeb; }
.mta-d7-toast-info    { border-left-color: var(--mta-color-primary, #6366f1); background: #eef2ff; }

.mta-d7-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.mta-d7-toast-msg {
    flex: 1;
    line-height: 1.4;
}

.mta-d7-toast-close {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--mta-ink-soft, #64748b);
    font-size: 18px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
}

.mta-d7-toast-close:hover {
    color: var(--mta-ink-strong, #0f172a);
}

/* ───────────────────────────────────────────────
   BACK TO TOP
   ─────────────────────────────────────────────── */

.mta-d7-back-to-top {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: var(--mta-color-primary, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms, visibility 250ms, transform 200ms;
}

.mta-d7-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

.mta-d7-back-to-top:hover {
    background: var(--mta-color-primary-hover, #4f46e5);
    transform: translateY(-3px);
}

@media (max-width: 768px) {
    .mta-d7-back-to-top {
        bottom: 90px;
        right: 16px;
        width: 44px;
        height: 44px;
    }
}

/* ───────────────────────────────────────────────
   MOBILE STICKY CTA
   ─────────────────────────────────────────────── */

.mta-d7-mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--mta-surface-base, #ffffff);
    border-top: 1px solid var(--mta-border-soft, #e2e8f0);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    z-index: 99;
    padding: 8px 12px;
    gap: 10px;
    justify-content: space-around;
}

@media (max-width: 1023px) {
    .mta-d7-mobile-cta { display: flex; }
    body { padding-bottom: 70px; }
}

.mta-d7-cta-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 8px;
    background: var(--mta-surface-raised, #f8fafc);
    border: 1px solid var(--mta-border-soft, #e2e8f0);
    border-radius: 10px;
    text-decoration: none;
    color: var(--mta-ink-strong, #0f172a);
    font-size: 13px;
    font-weight: 600;
    position: relative;
}

.mta-d7-cta-btn span {
    font-size: 16px;
}

.mta-d7-cta-label {
    font-size: 13px;
}

.mta-d7-cta-cart {
    background: var(--mta-color-primary, #6366f1);
    color: #ffffff;
    border-color: var(--mta-color-primary, #6366f1);
}

.mta-d7-cta-badge {
    position: absolute;
    top: 4px;
    right: 14px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    background: var(--mta-color-danger, #dc2626);
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ───────────────────────────────────────────────
   SKELETON LOADING
   ─────────────────────────────────────────────── */

.mta-d7-skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: mta-d7-shimmer 1.4s linear infinite;
    border-radius: 6px;
    display: block;
}

@keyframes mta-d7-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.mta-d7-skeleton-product-card {
    background: var(--mta-surface-base, #ffffff);
    border: 1px solid var(--mta-border-soft, #e2e8f0);
    border-radius: 12px;
    padding: 14px;
}

.mta-d7-skeleton-product-img {
    aspect-ratio: 1 / 1;
    margin-bottom: 12px;
}

.mta-d7-skeleton-line {
    height: 14px;
    margin-bottom: 8px;
}

.mta-d7-skeleton-line.short { width: 60%; }
.mta-d7-skeleton-line.tall  { height: 18px; }

/* ───────────────────────────────────────────────
   CUSTOM 404 PAGE
   ─────────────────────────────────────────────── */

.mta-d7-404-page {
    padding: 60px 0 100px;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mta-d7-404-content {
    max-width: 600px;
    text-align: center;
}

.mta-d7-404-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.mta-d7-404-code {
    font-size: 96px;
    font-weight: 800;
    color: var(--mta-color-primary, #6366f1);
    margin: 0 0 10px;
    line-height: 1;
}

.mta-d7-404-title {
    font-size: 28px;
    color: var(--mta-ink-strong, #0f172a);
    margin: 0 0 16px;
}

.mta-d7-404-text {
    font-size: 16px;
    color: var(--mta-ink-muted, #475569);
    line-height: 1.6;
    margin-bottom: 30px;
}

.mta-d7-404-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.mta-d7-404-search h3 {
    font-size: 16px;
    color: var(--mta-ink-strong, #0f172a);
    margin-bottom: 12px;
}

/* ───────────────────────────────────────────────
   KEYBOARD SHORTCUTS MODAL
   ─────────────────────────────────────────────── */

.mta-d7-shortcuts-list {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 8px 16px;
    margin: 0;
    padding: 0;
}

.mta-d7-shortcut-key {
    background: var(--mta-surface-raised, #f8fafc);
    border: 1px solid var(--mta-border-soft, #e2e8f0);
    border-radius: 6px;
    padding: 4px 10px;
    font-family: monospace;
    font-weight: 700;
    font-size: 13px;
    color: var(--mta-ink-strong, #0f172a);
    text-align: center;
    min-width: 32px;
}

.mta-d7-shortcut-desc {
    color: var(--mta-ink-base, #1e293b);
    font-size: 14px;
    align-self: center;
}

/* ───────────────────────────────────────────────
   SMOOTH SCROLL (Reduced motion respect)
   ─────────────────────────────────────────────── */

html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    body.mta-d7-respect-reduced-motion *,
    body.mta-d7-respect-reduced-motion *::before,
    body.mta-d7-respect-reduced-motion *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ───────────────────────────────────────────────
   PRINT STYLESHEET
   ─────────────────────────────────────────────── */

@media print {
    /* Hide non-content elements */
    .mta-d4-header,
    .mta-d4-announce,
    .mta-d4-navbar,
    .mta-d3-dock-desktop,
    .mta-d3-dock-mobile,
    .mta-d4-mega-overlay,
    .mta-footer,
    .mta-d5-filters,
    .mta-d5-toolbar,
    .mta-d5-card-actions,
    .mta-d5-quick-view-btn,
    .mta-d5-card-favorite,
    .mta-d6-alert-actions,
    .mta-d6-fav-card-actions,
    .mta-d7-back-to-top,
    .mta-d7-mobile-cta,
    .mta-d7-toast-container,
    .mta-d7-skip-link,
    .mta-d2-modal-backdrop,
    .add_to_cart_button,
    button {
        display: none !important;
    }

    /* Reset body padding */
    body {
        padding: 0 !important;
        background: #ffffff !important;
        color: #000000 !important;
        font-size: 11pt;
        line-height: 1.5;
    }

    .mta-d4-container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    /* Print URL after links */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666666;
        word-break: break-all;
    }

    /* Hide URL for navigation/internal links */
    a[href^="#"]::after,
    a[href*="javascript:"]::after {
        content: "";
    }

    /* Headings */
    h1, h2, h3 {
        page-break-after: avoid;
        color: #000000 !important;
    }

    /* Image */
    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Tables */
    table {
        border-collapse: collapse;
        width: 100%;
    }

    table, th, td {
        border: 1px solid #cccccc !important;
    }

    th, td {
        padding: 6px 10px;
    }

    /* Page break helpers */
    .page-break {
        page-break-before: always;
    }
}

/* ───────────────────────────────────────────────
   PULL TO REFRESH (mobile)
   ─────────────────────────────────────────────── */

.mta-d7-ptr-indicator {
    position: fixed;
    top: -50px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--mta-color-primary, #6366f1);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    z-index: 99997;
    transition: top 200ms;
    pointer-events: none;
}

.mta-d7-ptr-indicator.is-active {
    top: 80px;
}

.mta-d7-ptr-indicator.is-spinning::before {
    content: "↻";
    display: inline-block;
    animation: mta-d7-spin 800ms linear infinite;
    margin-right: 6px;
}

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

