/*
 * TradeVest Securities
 * Reusable Components
 *
 * @package TradeVest_Securities
 */


/* =========================================================
   1. BUTTONS
   ========================================================= */

.tv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 50px;
    padding-inline: 22px;

    background: transparent;
    color: inherit;

    border: 1px solid transparent;
    border-radius: var(--tv-radius-md);

    font: inherit;
    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);
    line-height: 1;
    text-align: center;
    white-space: nowrap;

    cursor: pointer;

    transition:
        background-color var(--tv-transition-fast),
        border-color var(--tv-transition-fast),
        color var(--tv-transition-fast),
        transform var(--tv-transition-fast),
        box-shadow var(--tv-transition-fast);
}

.tv-btn:hover {
    transform: translateY(-2px);
}

.tv-btn--primary {
    background: var(--tv-teal);
    color: var(--tv-white);
    border-color: var(--tv-teal);
    box-shadow: var(--tv-shadow-sm);
}

.tv-btn--primary:hover {
    background: var(--tv-teal-dark);
    color: var(--tv-white);
    border-color: var(--tv-teal-dark);
    box-shadow: var(--tv-shadow-md);
}

.tv-btn--secondary {
    background: transparent;
    color: var(--tv-navy);
    border-color: var(--tv-border-dark);
}

.tv-btn--secondary:hover {
    background: var(--tv-bg-soft);
    color: var(--tv-navy);
    border-color: var(--tv-navy);
}

.tv-btn--white {
    background: var(--tv-white);
    color: var(--tv-navy);
    border-color: var(--tv-white);
}

.tv-btn--white:hover {
    background: var(--tv-bg-soft);
    color: var(--tv-navy);
    border-color: var(--tv-bg-soft);
}

.tv-btn--link {
    min-height: auto;
    padding: 0;

    background: transparent;
    color: var(--tv-teal);

    border: 0;
    box-shadow: none;
}

.tv-btn--link:hover {
    color: var(--tv-teal-dark);
    transform: none;
}

.tv-btn__arrow {
    display: inline-block;

    transition: transform var(--tv-transition-fast);
}

.tv-btn:hover .tv-btn__arrow {
    transform: translateX(4px);
}


/* =========================================================
   2. CONTACT / FORM COMPONENTS
   ========================================================= */

.tv-contact-form {
    padding: 32px;

    background: var(--tv-white);

    border: 1px solid var(--tv-border);
    border-radius: var(--tv-radius-lg);

    box-shadow: var(--tv-shadow-sm);
}

.tv-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.tv-form-group {
    min-width: 0;
}

.tv-form-group--full {
    grid-column: 1 / -1;
}

.tv-form-label {
    display: block;

    margin-bottom: 7px;

    color: var(--tv-text);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);
}

.tv-form-required {
    color: var(--tv-error);
}

.tv-form-input,
.tv-form-select,
.tv-form-textarea {
    display: block;

    width: 100%;
    min-height: 50px;

    padding: 12px 14px;

    background: var(--tv-white);
    color: var(--tv-text);

    border: 1px solid var(--tv-border-dark);
    border-radius: var(--tv-radius-md);

    outline: none;

    font: inherit;
    font-size: var(--tv-text-sm);

    transition:
        border-color var(--tv-transition-fast),
        box-shadow var(--tv-transition-fast);
}

.tv-form-input::placeholder,
.tv-form-textarea::placeholder {
    color: var(--tv-text-light);
}

.tv-form-textarea {
    min-height: 130px;
    resize: vertical;
}

.tv-form-input:focus,
.tv-form-select:focus,
.tv-form-textarea:focus {
    border-color: var(--tv-teal);
    box-shadow: var(--tv-focus-ring);
}


/* =========================================================
   3. MODAL
   ========================================================= */

.tv-modal {
    position: fixed;
    inset: 0;
    z-index: var(--tv-z-modal);

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;
}

.tv-modal.is-open {
    display: flex;
}

.tv-modal__overlay {
    position: absolute;
    inset: 0;

    background: rgba(7, 26, 43, 0.65);

    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.tv-modal__dialog {
    position: relative;
    z-index: 1;

    width: min(100%, 560px);
    max-height: calc(100vh - 48px);

    overflow-y: auto;

    padding: 34px;

    background: var(--tv-white);

    border-radius: var(--tv-radius-xl);

    box-shadow: var(--tv-shadow-lg);

    animation: tv-modal-in 220ms ease both;
}

.tv-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 38px;
    height: 38px;
    padding: 0;

    background: var(--tv-bg-soft);
    color: var(--tv-navy);

    border: 1px solid var(--tv-border);
    border-radius: 50%;

    font: inherit;
    font-size: 1.25rem;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color var(--tv-transition-fast),
        border-color var(--tv-transition-fast),
        color var(--tv-transition-fast),
        transform var(--tv-transition-fast);
}

.tv-modal__close:hover {
    background: var(--tv-navy);
    color: var(--tv-white);
    border-color: var(--tv-navy);

    transform: rotate(4deg);
}


/* =========================================================
   MODAL HEADER
   ========================================================= */

.tv-modal__header {
    margin-bottom: 24px;

    text-align: center;
}

.tv-modal__eyebrow {
    margin-bottom: 8px;

    color: var(--tv-teal);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.tv-modal__title {
    margin-bottom: 8px;
    padding: 0;

    color: var(--tv-navy);

    font-size: var(--tv-text-2xl);
}

.tv-modal__description {
    margin: 0;

    color: var(--tv-text-secondary);

    font-size: var(--tv-text-sm);
    line-height: 1.7;
}

.tv-modal__service {
    color: var(--tv-teal);
}


/* =========================================================
   MODAL FORM
   ========================================================= */

.tv-modal .tv-contact-form {
    margin: 0;
    padding: 0;

    background: transparent;

    border: 0;
    border-radius: 0;

    box-shadow: none;
}


/* =========================================================
   MODAL SUBMIT
   ========================================================= */

.tv-form-group--submit {
    display: flex;
    justify-content: center;

    width: 100%;
}


/* =========================================================
   MODAL ANIMATION
   ========================================================= */

@keyframes tv-modal-in {

    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}


/* =========================================================
   4. BODY STATES
   ========================================================= */

body.tv-menu-open,
body.tv-modal-open {
    overflow: hidden;
}


/* =========================================================
   5. SITE HEADER
   ========================================================= */

.tv-site-header {
    position: sticky;
    top: 0;
    z-index: var(--tv-z-header);

    width: 100%;

    background: rgba(255, 255, 255, 0.97);

    border-bottom: 1px solid var(--tv-border);

    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.tv-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    min-height: var(--tv-header-height);
    gap: 30px;
}


/* =========================================================
   6. HEADER BRAND / LOGO
   ========================================================= */

.tv-header__brand {
    position: relative;
    z-index: 2;

    flex: 0 0 auto;
}

.tv-header__logo {
    display: inline-flex;
    align-items: center;

    line-height: 0;
    text-decoration: none;
}

.tv-header__logo-image {
    display: block;

    width: 175px;
    max-width: 175px;

    height: auto;
    max-height: 46px;

    margin: 0;
    padding: 0;

    object-fit: contain;
}


/* =========================================================
   HEADER LOGO — TABLET
   ========================================================= */

@media (max-width: 1024px) {

    .tv-header__logo-image {
        width: 165px;
        max-width: 165px;
        max-height: 44px;
    }

}


/* =========================================================
   HEADER LOGO — MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .tv-header__logo-image {
        width: 158px;
        max-width: 158px;
        max-height: 42px;
    }

}


/* =========================================================
   HEADER LOGO — SMALL MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .tv-header__logo-image {
        width: 150px;
        max-width: 150px;
        max-height: 40px;
    }

}


/* =========================================================
   7. MAIN NAVIGATION
   ========================================================= */

.tv-main-nav {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;

    margin: 0;

    transform: translate(-50%, -50%);
}

.tv-main-nav__list {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.tv-main-nav__list > li {
    position: relative;

    margin: 0;
    padding: 0;
}

.tv-main-nav__list > li > a {
    position: relative;

    display: inline-flex;
    align-items: center;

    min-height: var(--tv-header-height);

    color: var(--tv-text-secondary);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-medium);

    white-space: nowrap;

    transition: color var(--tv-transition-fast);
}

.tv-main-nav__list > li > a::after {
    position: absolute;
    right: 0;
    bottom: 20px;
    left: 0;

    height: 2px;

    background: var(--tv-teal);

    content: "";

    transform: scaleX(0);
    transform-origin: center;

    transition: transform var(--tv-transition-fast);
}

.tv-main-nav__list > li > a:hover,
.tv-main-nav__list > li.current-menu-item > a,
.tv-main-nav__list > li.current_page_item > a,
.tv-main-nav__list > li.current-menu-ancestor > a {
    color: var(--tv-navy);
}

.tv-main-nav__list > li > a:hover::after,
.tv-main-nav__list > li.current-menu-item > a::after,
.tv-main-nav__list > li.current_page_item > a::after,
.tv-main-nav__list > li.current-menu-ancestor > a::after {
    transform: scaleX(1);
}


/* =========================================================
   8. HEADER ACTIONS
   ========================================================= */

.tv-header__actions {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;
    gap: 10px;

    flex: 0 0 auto;
    margin-left: auto;
}

.tv-header__login {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 42px;
    padding-inline: 16px;

    background: transparent;
    color: var(--tv-navy);

    border: 1px solid var(--tv-border-dark);
    border-radius: var(--tv-radius-md);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);

    white-space: nowrap;

    transition:
        background-color var(--tv-transition-fast),
        border-color var(--tv-transition-fast),
        color var(--tv-transition-fast),
        transform var(--tv-transition-fast);
}

.tv-header__login:hover {
    background: var(--tv-bg-soft);
    color: var(--tv-teal);
    border-color: var(--tv-teal);

    transform: translateY(-1px);
}

.tv-btn--header {
    min-height: 42px;
    padding-inline: 20px;

    background: var(--tv-teal);
    color: var(--tv-white);

    border-color: var(--tv-teal);

    font-size: var(--tv-text-sm);
}

.tv-btn--header:hover {
    background: var(--tv-teal-dark);
    color: var(--tv-white);
    border-color: var(--tv-teal-dark);
}


/* =========================================================
   9. MOBILE MENU TOGGLE
   ========================================================= */

.tv-menu-toggle {
    display: none;

    width: 44px;
    height: 44px;
    padding: 10px;

    background: transparent;

    border: 0;

    cursor: pointer;
}

.tv-menu-toggle span {
    display: block;

    width: 100%;
    height: 2px;

    margin: 5px 0;

    background: var(--tv-navy);

    transition:
        transform var(--tv-transition-fast),
        opacity var(--tv-transition-fast);
}

.tv-menu-toggle.is-active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.tv-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.tv-menu-toggle.is-active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}


/* =========================================================
   10. MOBILE NAVIGATION BASE
   ========================================================= */

.tv-mobile-navigation {
    display: none;
}

.tv-mobile-nav__list,
.tv-mobile-nav__actions {
    margin: 0;
    padding: 0;
    list-style: none;
}


/* =========================================================
   11. FOOTER
   ========================================================= */

.tv-site-footer {
    padding-top: 72px;

    background: var(--tv-navy);
    color: rgba(255, 255, 255, 0.78);
}

.tv-footer {
    display: grid;

    grid-template-columns:
        minmax(260px, 1.6fr)
        repeat(3, minmax(140px, 1fr));

    gap: 50px;

    padding-bottom: 48px;
}

.tv-footer__brand {
    max-width: 390px;
}

.tv-footer__logo {
    display: inline-flex;
    flex-direction: column;

    line-height: 1;
}

.tv-footer__logo-name {
    color: var(--tv-white);

    font-size: 1.45rem;
    font-weight: var(--tv-weight-bold);
    letter-spacing: -0.025em;
}

.tv-footer__logo-subtitle {
    margin-top: 5px;

    color: var(--tv-teal-light);

    font-size: 0.62rem;
    font-weight: var(--tv-weight-semibold);
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.tv-footer__description {
    max-width: 390px;

    margin-top: 20px;
    margin-bottom: 0;

    color: rgba(255, 255, 255, 0.62);

    font-size: var(--tv-text-sm);
    line-height: 1.75;
}


/* =========================================================
   12. FOOTER SOCIAL
   ========================================================= */

.tv-footer__social {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;

    margin-top: 24px;
}

.tv-footer__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;
    flex: 0 0 36px;

    background: transparent;
    color: rgba(255, 255, 255, 0.68);

    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;

    transition:
        background-color var(--tv-transition-fast),
        border-color var(--tv-transition-fast),
        color var(--tv-transition-fast),
        transform var(--tv-transition-fast);
}

.tv-footer__social-link:hover {
    background: var(--tv-teal);
    color: var(--tv-white);
    border-color: var(--tv-teal);

    transform: translateY(-2px);
}

.tv-footer__social-link svg {
    display: block;

    width: 17px;
    height: 17px;

    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    overflow: visible;
}


/* =========================================================
   13. FOOTER COLUMNS
   ========================================================= */

.tv-footer__heading {
    margin-bottom: 20px;

    color: var(--tv-white);

    font-size: var(--tv-text-sm);
    font-weight: var(--tv-weight-semibold);
}

.tv-footer__links,
.tv-footer__contact {
    display: flex;
    flex-direction: column;
    gap: 11px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.tv-footer__links a,
.tv-footer__contact a,
.tv-footer__contact span {
    color: rgba(255, 255, 255, 0.62);

    font-size: var(--tv-text-sm);
    line-height: 1.6;

    transition: color var(--tv-transition-fast);
}

.tv-footer__links a:hover,
.tv-footer__contact a:hover {
    color: var(--tv-white);
}


/* =========================================================
   14. FOOTER CONTACT
   ========================================================= */

.tv-footer__contact-item {
    margin: 0;
}

.tv-footer__contact-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;

    color: rgba(255, 255, 255, 0.62);

    font-size: var(--tv-text-sm);
    line-height: 1.6;

    transition: color var(--tv-transition-fast);
}

.tv-footer__contact-link:hover {
    color: var(--tv-white);
}

.tv-footer__contact-icon {
    display: block;

    width: 17px;
    height: 17px;
    flex: 0 0 17px;

    fill: none;
    stroke: var(--tv-teal-light);
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* =========================================================
   15. FOOTER REGISTRATION / DISCLAIMER
   ========================================================= */

.tv-footer__registration {
    padding: 22px 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);

    text-align: center;
}

.tv-footer__registration p {
    margin: 0;

    color: rgba(255, 255, 255, 0.60);

    font-size: var(--tv-text-xs);
    line-height: 1.7;
}

.tv-footer__registration strong {
    color: rgba(255, 255, 255, 0.82);
    font-weight: var(--tv-weight-semibold);
}

.tv-footer__disclaimer {
    padding: 24px 20px;

    border-top: 1px solid rgba(255, 255, 255, 0.12);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);

    text-align: center;
}

.tv-footer__disclaimer p {
    max-width: 1000px;
    margin: 0 auto;

    color: rgba(255, 255, 255, 0.56);

    font-size: var(--tv-text-xs);
    line-height: 1.75;
}


/* =========================================================
   16. FOOTER BOTTOM
   ========================================================= */

.tv-footer__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;

    min-height: 72px;
}

.tv-footer__copyright {
    color: rgba(255, 255, 255, 0.48);
    font-size: var(--tv-text-xs);
}

.tv-footer__legal {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;

    gap: 20px;
}

.tv-footer__legal a {
    color: rgba(255, 255, 255, 0.52);

    font-size: var(--tv-text-xs);

    transition: color var(--tv-transition-fast);
}

.tv-footer__legal a:hover {
    color: var(--tv-white);
}


/* =========================================================
   17. SHARED ICON SYSTEM
   ========================================================= */

.tv-service-card__icon,
.tv-principle__icon,
.tv-approach__marker {
    color: var(--tv-teal);
}

.tv-service-card__icon svg,
.tv-principle__icon svg,
.tv-approach__marker svg {
    display: block;

    width: 23px;
    height: 23px;

    margin: 0;
    padding: 0;

    fill: none;
    color: currentColor;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;

    overflow: visible;
}
