/* Global UI Enhancements (all public/user pages) */

.wm-ui {
    --ui-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --ui-shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.08);
    --ui-shadow-md: 0 14px 34px rgba(15, 23, 42, 0.12);
    --ui-ring: 0 0 0 3px rgba(212, 165, 116, 0.24);
}

.wm-ui *,
.wm-ui *::before,
.wm-ui *::after {
    -webkit-tap-highlight-color: transparent;
}

.wm-ui img,
.wm-ui svg,
.wm-ui video,
.wm-ui canvas {
    max-width: 100%;
    height: auto;
}

/* Ensure icon fonts always render correctly even when page styles override font-family */
.wm-ui i.fa,
.wm-ui i.fas,
.wm-ui i.fa-solid {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 900 !important;
    font-style: normal;
}

.wm-ui i.far,
.wm-ui i.fa-regular {
    font-family: "Font Awesome 6 Free", "FontAwesome" !important;
    font-weight: 400 !important;
    font-style: normal;
}

.wm-ui i.fab,
.wm-ui i.fa-brands {
    font-family: "Font Awesome 6 Brands", "FontAwesome" !important;
    font-weight: 400 !important;
    font-style: normal;
}

/* Avoid legacy global link underline pseudo-elements on button-like links */
.wm-ui .btn::after,
.wm-ui .auth-link::after,
.wm-ui .pl-btn::after,
.wm-ui .db-nav-list a::after {
    content: none !important;
    display: none !important;
}

.wm-ui .container {
    padding-left: clamp(12px, 2.2vw, 24px) !important;
    padding-right: clamp(12px, 2.2vw, 24px) !important;
}

@media (min-width: 1400px) {
    .wm-ui .container {
        max-width: 1280px;
    }
}

.wm-ui a:focus-visible,
.wm-ui button:focus-visible,
.wm-ui input:focus-visible,
.wm-ui select:focus-visible,
.wm-ui textarea:focus-visible {
    outline: none;
    box-shadow: var(--ui-ring);
    border-radius: 8px;
}

/* Shared interactive surfaces */
.wm-ui .db-sec,
.wm-ui .up-sec,
.wm-ui .pe-sec,
.wm-ui .pn-sec,
.wm-ui .st-sec,
.wm-ui .ir-sec,
.wm-ui .pl-card,
.wm-ui .pl-faq-item,
.wm-ui .chat-container,
.wm-ui .db-nav-card,
.wm-ui .wed-foot-link > div {
    transition: transform 0.28s var(--ui-ease), box-shadow 0.28s var(--ui-ease), border-color 0.28s var(--ui-ease);
}

@media (hover: hover) {
    .wm-ui .db-sec:hover,
    .wm-ui .up-sec:hover,
    .wm-ui .pe-sec:hover,
    .wm-ui .pn-sec:hover,
    .wm-ui .st-sec:hover,
    .wm-ui .ir-sec:hover,
    .wm-ui .pl-faq-item:hover {
        transform: translateY(-4px);
        box-shadow: var(--ui-shadow-sm);
    }
}

.wm-ui .btn,
.wm-ui button,
.wm-ui .pl-btn,
.wm-ui .auth-link {
    transition: transform 0.22s var(--ui-ease), box-shadow 0.22s var(--ui-ease), filter 0.22s var(--ui-ease);
}

@media (hover: hover) {
    .wm-ui .btn:hover,
    .wm-ui button:hover,
    .wm-ui .pl-btn:hover,
    .wm-ui .auth-link:hover {
        transform: translateY(-2px);
    }
}

.wm-ui button:disabled,
.wm-ui .btn:disabled,
.wm-ui .pl-btn:disabled {
    transform: none !important;
    cursor: not-allowed;
}

/* Scroll-reveal baseline */
.wm-ui.ui-reveal-ready .ui-reveal-item {
    opacity: 0;
    transform: translateY(18px) scale(0.985);
}

.wm-ui.ui-reveal-ready .ui-reveal-item.is-visible {
    opacity: 1;
    transform: none;
    transition: opacity 0.46s var(--ui-ease), transform 0.46s var(--ui-ease);
    transition-delay: var(--reveal-delay, 0ms);
}

/* Tablet */
@media (max-width: 1199px) {
    .wm-ui .hom-nav .bl ul li a,
    .wm-ui .hom-nav .bl ul li span {
        font-size: 13px;
        padding-left: 9px !important;
        padding-right: 9px !important;
    }
}

/* Mobile + tablet */
@media (max-width: 991px) {
    .wm-ui .mid-head {
        display: none !important;
    }

    .wm-ui .head-top .rhs {
        float: none !important;
        width: 100% !important;
        display: flex;
        justify-content: center;
    }

    .wm-ui .head-top .rhs ul {
        float: none !important;
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .wm-ui .hom-top {
        height: auto !important;
        padding: 6px 0 !important;
    }

    .wm-ui .hom-nav {
        min-height: 64px;
        gap: 10px !important;
    }

    .wm-ui .logo img,
    .wm-ui .hom-nav .logo img {
        max-height: 54px !important;
    }

    .wm-ui .auth-buttons {
        display: none !important;
    }

    .wm-ui [class*="col-"] {
        min-width: 0;
    }

    .wm-ui .db-main-scroll {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }

    .wm-ui .chat-container {
        height: auto !important;
        min-height: 0 !important;
    }

    .wm-ui .chat-sidebar {
        max-height: 300px;
    }

    .wm-ui .pl-grid {
        grid-template-columns: 1fr !important;
        max-width: 480px !important;
    }

    .wm-ui .pl-compare-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wm-ui .pl-compare-table th,
    .wm-ui .pl-compare-table td {
        white-space: nowrap;
    }
}

/* Small phones */
@media (max-width: 767px) {
    .wm-ui .db-layout {
        margin-top: 8px !important;
    }

    .wm-ui .db-nav-card {
        border-radius: 14px;
    }

    .wm-ui .pl-card-inner {
        padding: 24px 18px;
    }

    .wm-ui .pl-plan-price {
        font-size: 2.15rem;
    }

    .wm-ui .wed-foot-link > div {
        margin-bottom: 18px;
    }

    .wm-ui .footer-logo-col {
        justify-content: center;
    }
}

/* Tablet layout refinement */
@media (min-width: 768px) and (max-width: 1024px) {
    .wm-ui .pl-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        max-width: 900px !important;
    }

    .wm-ui .pl-grid .pl-card:last-child {
        grid-column: 1 / -1;
        max-width: 430px;
        margin: 0 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wm-ui *,
    .wm-ui *::before,
    .wm-ui *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
