/*
 * Memur Kahvesi live-readiness layer.
 * Last-mile accessibility and responsive safeguards shared by every surface.
 */

:root {
    --mk-focus-outline: #f4b740;
    --mk-focus-offset: 3px;
}

html { scroll-padding-top: 92px; }
body { min-width: 0; }
:where(img, video, canvas, svg) { max-width: 100%; }
:where(img, video) { height: auto; }
:where(p, li, dd, td, th, blockquote, figcaption, .page-card, .mk-card) { overflow-wrap: anywhere; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid var(--mk-focus-outline) !important;
    outline-offset: var(--mk-focus-offset);
    box-shadow: 0 0 0 5px rgba(23, 32, 51, 0.2) !important;
}

.skip-link {
    position: fixed !important;
    inset: 12px auto auto 12px !important;
    z-index: 100000 !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    padding: 10px 14px !important;
    overflow: visible !important;
    clip: auto !important;
    clip-path: none !important;
    transform: translateY(-180%);
    border: 2px solid #fff !important;
    border-radius: var(--mk-radius, 6px) !important;
    background: var(--mk-color-navy, #172033) !important;
    color: #fff !important;
    font-weight: 800;
    text-decoration: none;
    transition: transform 140ms ease;
}

.skip-link:focus,
.skip-link:focus-visible { transform: translateY(0); }
#site-content:focus { outline: 0; }
:where(button, input, select, textarea) { max-width: 100%; }
:where(table) { border-spacing: 0; }

:where(.table-responsive, .table-wrap, .admin-table-wrap, .taxonomy-table-wrap) {
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
}

@media (hover: none) and (pointer: coarse) {
    :where(button, .btn, .mk-btn, input[type="submit"], input[type="button"], input[type="reset"]) {
        min-height: 44px;
    }

    :where(.icon-button, .header-action, .mobile-menu-btn, .notification-trigger) {
        min-width: 44px;
        min-height: 44px;
    }
}

@media (max-width: 720px) {
    html { scroll-padding-top: 76px; }
    :where(.mk-page-shell, .page-shell) {
        width: min(calc(100% - 20px), var(--mk-container, 1400px));
    }
    :where(.page-hero, .mk-page-hero, .page-card, .mk-card) { min-width: 0; }
    :where(.page-hero__actions, .hero-actions, .form-actions, .filter-actions) {
        max-width: 100%;
        flex-wrap: wrap;
    }
}

@media (prefers-reduced-motion: reduce) {
    html:focus-within { scroll-behavior: auto; }
    *, *::before, *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media print {
    .skip-link, .header, .site-footer, .mobile-menu-btn, .notification-panel, .ad-slot {
        display: none !important;
    }
    body { background: #fff !important; color: #000 !important; }
    :where(.page-card, .mk-card, .page-hero, .mk-page-hero) { box-shadow: none !important; }
}
/* Chat room navigation must keep one dark, high-contrast color contract. */
body.mk-page-chat.mk-product-conversation .rooms-title h2 {
    color: #fff !important;
}

body.mk-page-chat.mk-product-conversation .rooms-title p {
    color: rgba(241, 245, 249, .76) !important;
}

body.mk-page-chat.mk-product-conversation .rooms-icon {
    border-color: rgba(255, 255, 255, .18) !important;
    background: rgba(255, 255, 255, .09) !important;
    color: #67e8f9 !important;
}

body.mk-page-chat.mk-product-conversation .rooms-tabs-wrapper {
    margin: .85rem 0 0 !important;
    padding: .55rem !important;
    border-color: rgba(255, 255, 255, .14) !important;
    background: rgba(15, 23, 42, .34) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05) !important;
}

body.mk-page-chat.mk-product-conversation .room-pill {
    border-color: rgba(255, 255, 255, .16) !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #f8fafc !important;
}

body.mk-page-chat.mk-product-conversation .room-pill .pill-name {
    color: inherit !important;
}

body.mk-page-chat.mk-product-conversation .room-pill .pill-count {
    background: rgba(15, 23, 42, .5) !important;
    color: #cbd5e1 !important;
}

body.mk-page-chat.mk-product-conversation .room-pill:hover,
body.mk-page-chat.mk-product-conversation .room-pill.active {
    border-color: rgba(103, 232, 249, .58) !important;
    background: rgba(8, 145, 178, .3) !important;
    color: #fff !important;
}

body.mk-page-chat.mk-product-conversation .room-pill:hover .pill-count,
body.mk-page-chat.mk-product-conversation .room-pill.active .pill-count {
    background: rgba(255, 255, 255, .16) !important;
    color: #fff !important;
}

/* Chat institution write-access states. */
body.mk-page-chat.mk-product-conversation .room-pill.room-read-only:not(.active) {
    opacity: .78;
}

body.mk-page-chat.mk-product-conversation .room-pill .pill-lock {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: .15rem;
    color: #fbbf24;
}

body.mk-page-chat.mk-product-conversation .room-pill .pill-lock svg,
body.mk-page-chat.mk-product-conversation .chat-read-only-icon svg {
    width: 1rem;
    height: 1rem;
}

body.mk-page-chat.mk-product-conversation .chat-read-only-notice {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-height: 64px;
    border: 1px solid #fdba74;
    background: #fff7ed;
    color: #7c2d12;
    line-height: 1.55;
}

body.mk-page-chat.mk-product-conversation .chat-read-only-icon {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 6px;
    background: #ffedd5;
    color: #c2410c;
}

@media (max-width: 720px) {
    body.mk-page-chat.mk-product-conversation .chat-read-only-notice {
        align-items: flex-start;
        font-size: .9rem;
    }
}
/*
 * One restrained page-entry motion for every public surface. Authentication
 * screens keep their purpose-built card animation.
 */
@keyframes mkPageShellEnter {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@media (prefers-reduced-motion: no-preference) {
    body:not(.auth-page) .site-main {
        animation: mkPageShellEnter .46s cubic-bezier(.22, 1, .36, 1);
    }
}