body {
    margin: 0;
    background: #fff;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
}

::selection {
    background: #8A2CE6;
    color: #fff;
}

/* FormBuilderCustom (core/app/Helper/FormBuilderCustom.php) renders fixed,
   server-side class names we can't change without touching the old design.
   These overrides only ever load on v2 pages, so they can't leak back. */
.custom-form-builder-form .form-group {
    margin-bottom: 1rem;
}

.custom-form-builder-form .form-control {
    width: 100%;
    border: 1px solid #D7D9DD;
    border-radius: 10px;
    padding: 14px 20px;
    font-size: 16px;
    color: #1E242E;
    font-family: 'Inter Tight', sans-serif;
}

.custom-form-builder-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #1E242E;
}

.custom-form-builder-form .submit-btn,
.custom-form-builder-form button[type="submit"] {
    background: #E7531A;
    color: #fff;
    font-family: Urbanist, sans-serif;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 28px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
}

.custom-form-builder-form .error-message,
.custom-form-builder-form .text-danger {
    color: #E7531A;
    font-size: 14px;
    margin-top: 4px;
    display: block;
}

/* Primary nav (see core/resources/views/frontend/v2/layout/partials/navbar.blade.php).
   render_frontend_menu() (core/plugins/MenuBuilder/MenuBuilderFrontendRender.php) emits
   plain <li>/<a>/<ul class="sub-menu"> markup driven by the admin Menu Builder
   (admin/menu/all) — no Bootstrap classes baked in, so it's styled here directly
   rather than reimplemented. */
.v2-nav-menu,
.v2-nav-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.v2-nav-menu {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.v2-nav-menu li {
    position: relative;
}

.v2-nav-menu > li > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 0;
    font-size: 16px;
    color: #323C4C;
}

.v2-nav-menu > li.current-menu-item > a {
    color: #1E242E;
    font-weight: 500;
}

.v2-nav-menu li.menu-item-has-children > a::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    opacity: 0.6;
    flex-shrink: 0;
}

.v2-nav-menu .sub-menu {
    padding-left: 16px;
}

.v2-nav-menu .sub-menu a {
    display: block;
    padding: 8px 0;
    font-size: 15px;
    color: #323C4C;
}

.v2-nav-menu .sub-menu a:hover {
    color: #1E242E;
}

@media (min-width: 1024px) {
    .v2-nav-menu {
        flex-direction: row;
        align-items: center;
        gap: 24px;
        width: auto;
    }

    .v2-nav-menu > li > a {
        padding: 0;
        white-space: nowrap;
    }

    .v2-nav-menu li.menu-item-has-children > .sub-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        margin-top: 16px;
        min-width: 200px;
        background: #fff;
        border: 1px solid #EBECEE;
        border-radius: 10px;
        box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
        padding: 8px;
        z-index: 50;
    }

    /* Bridges the 16px gap (margin-top above) with an invisible hit area so the
       cursor never leaves a hoverable element while moving from the nav link down
       into the dropdown — without it, :hover drops mid-transit and the menu closes
       before it can be clicked. */
    .v2-nav-menu > li.menu-item-has-children > .sub-menu::before {
        content: '';
        position: absolute;
        top: -16px;
        left: 0;
        right: 0;
        height: 16px;
    }

    /* :hover/:focus-within are a no-JS fallback; initDesktopNavDropdowns() in app.js
       drives the .v2-nav-dropdown-open class with a short close-delay so a slow or
       diagonal cursor path through the gap above doesn't close the menu mid-transit. */
    .v2-nav-menu li.menu-item-has-children:hover > .sub-menu,
    .v2-nav-menu li.menu-item-has-children:focus-within > .sub-menu,
    .v2-nav-menu li.menu-item-has-children.v2-nav-dropdown-open > .sub-menu {
        display: block;
    }

    .v2-nav-menu .sub-menu li.menu-item-has-children > .sub-menu {
        top: 0;
        left: 100%;
        margin-top: 0;
    }

    .v2-nav-menu .sub-menu a {
        padding: 8px 12px;
        border-radius: 6px;
        white-space: nowrap;
    }

    .v2-nav-menu .sub-menu a:hover {
        background: #F8F4FE;
    }
}

/* FAQ accordion (see assets/frontend-v2/js/app.js initFaqAccordion) */
.v2-faq-item .v2-faq-icon {
    transition: transform 0.2s ease;
}

.v2-faq-item.open .v2-faq-icon {
    transform: rotate(45deg);
}

.v2-faq-item .v2-faq-answer {
    display: none;
}

.v2-faq-item.open .v2-faq-answer {
    display: block;
}

/* Generic modal chrome (see assets/frontend-v2/js/app.js initModals) — used by the
   subscriptions/all purchase flow (login + payment gateway modals). */
.v2-modal {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    /* Without this, a drawer panel sitting at translateX(-100%) — closed or
       mid-transition (see .v2-drawer-panel) — can extend the page's scrollable
       area off-screen to the left, producing an unwanted horizontal scrollbar. */
    overflow: hidden;
}

.v2-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(30, 36, 46, 0.6);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.v2-modal.v2-modal-open .v2-modal-backdrop {
    opacity: 1;
}

.v2-modal-panel {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.2);
}

/* Left-anchored drawer panel (see the campaign filter drawer in
   frontend/v2/pages/campaign-list.blade.php) — slides in via transform instead of
   the plain hidden/shown centered .v2-modal-panel dialogs above. */
.v2-drawer-panel {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
}

.v2-modal.v2-modal-open .v2-drawer-panel {
    transform: translateX(0);
}

.v2-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 24px 24px 0;
}

.v2-modal-close {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #323C4C;
}

.v2-modal-body {
    padding: 20px 24px;
}

.v2-modal-footer {
    padding: 0 24px 24px;
}

body.overflow-hidden {
    overflow: hidden;
}

/* Real subscription-purchase gateway list — raw <ul>/<li data-gateway> markup
   emitted server-side by App\Helper\PaymentGatewayList (shared with the old
   Bootstrap page), styled here directly since it carries no Tailwind classes. */
.payment_getway_image ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.payment_getway_image ul li {
    border: 1px solid #C1C4CA;
    border-radius: 10px;
    padding: 10px;
    min-width: 72px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.payment_getway_image ul li.active,
.payment_getway_image ul li.selected {
    border-color: #E7531A;
    box-shadow: 0 0 0 1px #E7531A;
}

.payment_getway_image img {
    max-width: 64px;
    max-height: 32px;
    object-fit: contain;
}

.wallet-payment-gateway-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.kinetic_payment_show_hide {
    display: none;
}

.manual_payment_gateway_extra_field {
    display: none;
}

.manual_payment_gateway_extra_field input[type="file"] {
    display: block;
    width: 100%;
    border: 1px solid #C1C4CA;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 14px;
    margin-top: 4px;
}

.manual_description {
    font-size: 13px;
    color: #323C4C;
    margin-top: 6px;
}

/* Typography for raw WYSIWYG blog content (see frontend/v2/pages/blog-details.blade.php)
   — {!! $content !!} is trusted admin-authored HTML with no existing typography
   treatment anywhere in the codebase (the old design only sets a text color). */
.v2-blog-content {
    display: flex;
    flex-direction: column;
    gap: 16px;
    font-size: 16px;
    line-height: 24px;
    color: #37424E;
}

.v2-blog-content h2 {
    margin: 8px 0 0;
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 24px;
    color: #1E242E;
}

.v2-blog-content h3 {
    margin: 8px 0 0;
    font-family: 'Urbanist', sans-serif;
    font-weight: 600;
    font-size: 20px;
    color: #1E242E;
}

.v2-blog-content p {
    margin: 0;
}

.v2-blog-content img {
    width: 100%;
    border-radius: 12px;
}

.v2-blog-content ul,
.v2-blog-content ol {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.v2-blog-content a {
    color: #8A2CE6;
    text-decoration: underline;
}

.v2-blog-content blockquote {
    margin: 0;
    background: #F8F4FE;
    border: 1px solid #8A2CE6;
    border-left: 4px solid #8A2CE6;
    border-radius: 12px;
    padding: 24px 42px 24px 24px;
    font-size: 18px;
    line-height: 27px;
    color: #1E242E;
}
