/*
 * Studio UCA dashboard accessibility layer.
 * Keep overrides narrow so this file can remain the final, conflict-light layer.
 */

html.designer-dashboard-skin.theme-light {
    --uca-brand-subtle: #6f706c;
}

.uca-skip-link {
    position: fixed;
    top: calc(env(safe-area-inset-top, 0px) + 0.5rem);
    left: calc(env(safe-area-inset-left, 0px) + 0.75rem);
    z-index: 1000;
    transform: translateY(calc(-100% - 1rem));
    border: 2px solid #ffffff;
    border-radius: 0.5rem;
    background: #0f172a;
    color: #ffffff;
    padding: 0.7rem 1rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25;
    box-shadow: 0 0 0 3px #2563eb;
    transition: transform 160ms ease-out;
}

.uca-skip-link:focus,
.uca-skip-link:focus-visible {
    transform: translateY(0);
    outline: none;
}

html.designer-dashboard-skin #sidebar-nav #partner-dashboard-link {
    display: flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

html.designer-dashboard-skin #sidebar-nav #user-profile {
    cursor: default;
}

html.designer-dashboard-skin.theme-dark #sidebar-nav #user-profile:hover {
    background: transparent !important;
}

html.designer-dashboard-skin #content-area #ops-executive-checklist .line-clamp-2,
html.designer-dashboard-skin #content-area #ops-executive-checklist .line-clamp-3 {
    display: -webkit-box !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
}

html.designer-dashboard-skin #content-area #ops-executive-checklist .line-clamp-2 {
    -webkit-line-clamp: 2 !important;
    line-clamp: 2;
}

html.designer-dashboard-skin #content-area #ops-executive-checklist .line-clamp-3 {
    -webkit-line-clamp: 3 !important;
    line-clamp: 3;
}

@media (pointer: coarse) {
    html.designer-dashboard-skin #sidebar-nav a,
    html.designer-dashboard-skin #sidebar-nav button,
    html.designer-dashboard-skin #sidebar-nav #partner-dashboard-link,
    html.designer-dashboard-skin main > header button,
    html.designer-dashboard-skin #content-area #ops-executive-checklist button {
        min-height: 44px !important;
        touch-action: manipulation;
    }

    html.designer-dashboard-skin main > header button,
    html.designer-dashboard-skin #content-area .uca-help-button {
        min-width: 44px !important;
    }

    html.designer-dashboard-skin #content-area .uca-help-button {
        min-height: 44px !important;
    }
}

@media (max-width: 768px), (pointer: coarse) {
    html.designer-dashboard-skin main > header {
        padding-top: 7px !important;
        padding-bottom: 7px !important;
    }

    html.designer-dashboard-skin main > header button,
    html.designer-dashboard-skin main > header a {
        min-height: 44px !important;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        touch-action: manipulation;
    }

    html.designer-dashboard-skin #content-area button,
    html.designer-dashboard-skin #content-area a[role="button"],
    html.designer-dashboard-skin #content-area [role="button"],
    html.designer-dashboard-skin #content-area .action-btn,
    html.designer-dashboard-skin #content-area [class*="command-btn"] {
        min-height: 44px !important;
        min-width: 44px;
        touch-action: manipulation;
    }

    html.designer-dashboard-skin #content-area select,
    html.designer-dashboard-skin #content-area textarea,
    html.designer-dashboard-skin #content-area input:not([type]),
    html.designer-dashboard-skin #content-area input[type="text"],
    html.designer-dashboard-skin #content-area input[type="number"],
    html.designer-dashboard-skin #content-area input[type="date"],
    html.designer-dashboard-skin #content-area input[type="email"],
    html.designer-dashboard-skin #content-area input[type="password"],
    html.designer-dashboard-skin #content-area input[type="tel"],
    html.designer-dashboard-skin #content-area input[type="search"],
    html.designer-dashboard-skin #content-area input[type="url"],
    html.designer-dashboard-skin #content-area input[type="file"],
    html.designer-dashboard-skin #content-area input[type="month"],
    html.designer-dashboard-skin #content-area input[type="time"] {
        min-height: 44px !important;
        font-size: 16px !important;
    }
}

html.designer-dashboard-skin #sidebar-nav a:focus-visible,
html.designer-dashboard-skin #sidebar-nav button:focus-visible,
html.designer-dashboard-skin main > header button:focus-visible,
html.designer-dashboard-skin #content-area #ops-executive-checklist button:focus-visible,
html.designer-dashboard-skin #content-area .uca-help-button:focus-visible {
    outline: 3px solid var(--uca-brand-accent) !important;
    outline-offset: 3px !important;
}

html.designer-dashboard-skin #content-area button:focus-visible,
html.designer-dashboard-skin #content-area a:focus-visible,
html.designer-dashboard-skin #content-area input:focus-visible,
html.designer-dashboard-skin #content-area select:focus-visible,
html.designer-dashboard-skin #content-area textarea:focus-visible,
html.designer-dashboard-skin #content-area [role="button"]:focus-visible {
    outline: 3px solid var(--uca-brand-accent, #2563eb) !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {
    .uca-skip-link,
    html.designer-dashboard-skin #sidebar-nav,
    html.designer-dashboard-skin #mobile-menu-overlay,
    html.designer-dashboard-skin main > header button,
    html.designer-dashboard-skin #content-area #ops-executive-checklist button,
    html.designer-dashboard-skin #content-area #ops-executive-checklist article[data-checklist-card="true"],
    html.designer-dashboard-skin #content-area .uca-help-button,
    html.designer-dashboard-skin #content-area .uca-help-tooltip {
        animation: none !important;
        transition: none !important;
    }

    html.designer-dashboard-skin,
    html.designer-dashboard-skin body,
    html.designer-dashboard-skin #content-area {
        scroll-behavior: auto !important;
    }

    html.designer-dashboard-skin #content-area .animate-enter,
    html.designer-dashboard-skin #content-area .animate-fadeIn,
    html.designer-dashboard-skin #content-area .animate-slideUp,
    html.designer-dashboard-skin #content-area .animate-pulse,
    html.designer-dashboard-skin #content-area [class*="transition-"] {
        animation: none !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    html.designer-dashboard-skin #content-area #ops-executive-checklist button:hover,
    html.designer-dashboard-skin #content-area #ops-executive-checklist article[data-checklist-card="true"]:hover {
        transform: none !important;
    }
}
