/* ==========================================================================
   VELORA — global UI polish (accessibility, consistency, responsive tables)
   Non-destructive overrides. Load after theme stylesheets.
   ========================================================================== */

:root {
    --vl-focus-ring: 0 0 0 3px rgba(198, 167, 94, 0.35);
    --vl-transition: 0.18s ease;
}

/* Focus visibility (keyboard users) */
a:focus-visible,
button:focus-visible,
.btn:focus-visible,
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible,
.page-link:focus-visible,
.ol-btn-secondary:focus-visible,
.ol-btn-outline-secondary:focus-visible {
    outline: none;
    box-shadow: var(--vl-focus-ring);
}

/* Skip link for accessibility */
.vl-skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 10000;
    padding: 10px 16px;
    background: #1c1c1c;
    color: #fff;
    border-radius: 0 0 8px 0;
    text-decoration: none;
    font-weight: 600;
}
.vl-skip-link:focus {
    left: 0;
}

/* Consistent form control height */
.form-control,
.form-select,
.ol-form-control,
.fsh-form-control {
    min-height: 44px;
}

textarea.form-control,
textarea.ol-form-control {
    min-height: 96px;
}

/* Validation states */
.is-invalid,
.form-control.is-invalid {
    border-color: #c0392b !important;
}
.invalid-feedback,
.text-danger.small {
    font-size: 13px;
    margin-top: 6px;
}

/* Tables — responsive scroll + sticky header */
.vl-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
}
.vl-table-wrap .table,
.vl-table-wrap .eTable {
    margin-bottom: 0;
}
.vl-table-wrap thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: inherit;
    white-space: nowrap;
}

/* Empty state */
.vl-empty-state {
    text-align: center;
    padding: 48px 24px;
    color: #6f6a60;
}
.vl-empty-state__icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3ecdc;
    color: #b5934a;
    font-size: 24px;
}
.vl-empty-state__title {
    font-weight: 600;
    font-size: 17px;
    color: #1c1c1c;
    margin-bottom: 8px;
}
.vl-empty-state__text {
    font-size: 14px;
    max-width: 420px;
    margin: 0 auto 16px;
    line-height: 1.55;
}

/* Status chips */
.vl-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    line-height: 1.2;
}
.vl-badge--neutral { background: #f0ebe3; color: #5c564c; }
.vl-badge--success { background: #e8f5ee; color: #1d6b42; }
.vl-badge--warning { background: #fdf4e3; color: #9a6b1a; }
.vl-badge--danger { background: #fdecea; color: #b42318; }

/* Loading skeleton */
.vl-skeleton {
    background: linear-gradient(90deg, #f0ebe3 25%, #faf8f4 50%, #f0ebe3 75%);
    background-size: 200% 100%;
    animation: vl-shimmer 1.2s ease-in-out infinite;
    border-radius: 8px;
}
@keyframes vl-shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Page section spacing (storefront) */
.vl-page-section {
    padding: 56px 0 72px;
}
@media (max-width: 767.98px) {
    .vl-page-section {
        padding: 40px 0 56px;
    }
}

/* Admin / vendor gap modules */
.vl-gap-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.vl-gap-header .title {
    margin: 0;
}
.vl-gap-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

/* Prevent horizontal overflow on mobile */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Toast / alert polish */
.alert {
    border-radius: 12px;
    border-width: 1px;
}

/* Pagination alignment */
.pagination {
    margin-top: 16px;
    margin-bottom: 0;
    flex-wrap: wrap;
    gap: 4px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
