/* ============================================================
   Synlinker UI Refresh — overlay stylesheet
   Loaded AFTER main.min.css (see dist/header.jsp).
   Only shape / spacing / motion here — theme colours stay
   inline in the JSPs so member appearance settings still win.
   ============================================================ */

/* ---------- Bio page: profile header ---------- */

.bio-avatar {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.9),
                0 8px 24px rgba(0, 0, 0, 0.18);
}

@media (min-width: 768px) {
    .bio-avatar {
        width: 160px;
        height: 160px;
    }
}

.bio-name {
    font-size: clamp(1.4rem, 4vw, 1.9rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.bio-about {
    max-width: min(640px, 92vw);
    margin: 0 auto;
    text-align: center;
    line-height: 1.6;
    font-size: 0.975rem;
    opacity: 0.92;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* ---------- Bio page: tab switcher ---------- */

#contentSwitcher .nav-tabs {
    background: rgba(255, 255, 255, 0.75);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 4px;
}

#contentSwitcher .nav-tabs li a {
    padding: 10px 24px !important;
    font-size: 15px;
    font-weight: 600;
    z-index: 1;
    transition: color 0.25s ease;
}

/* keep the sliding pill visible under the links and make the
   active label readable on top of it */
#contentSwitcher .nav-tabs .nav-link,
#contentSwitcher .nav-tabs .nav-link.active {
    background: transparent !important;
}

#contentSwitcher .nav-tabs .nav-link.active {
    color: #fff !important;
}

#contentSwitcher .tabslider {
    height: calc(100% - 8px);
    bottom: 4px;
    background-color: #111;
    transition: left 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#contentSwitcher .tab-pane {
    padding: 15px 0;
    margin-top: 1.25rem;
}

/* ---------- Bio page: link buttons ---------- */

.custom-btn a[class*="btn-"] {
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    will-change: transform;
}

.custom-btn a[class*="btn-"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(0, 0, 0, 0.35);
}

.custom-btn a[class*="btn-"]:active {
    transform: translateY(0) scale(0.99);
    box-shadow: 0 4px 12px -8px rgba(0, 0, 0, 0.3);
}

/* ---------- Bio page: shop cards ---------- */

.product-list.frontEnd > div {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.product-list.frontEnd > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 32px -16px rgba(0, 0, 0, 0.3);
}

.product-list.frontEnd img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

.product-list .discount-link {
    font-weight: 700;
    text-decoration: none;
}

.product-list .discount-link:hover {
    text-decoration: underline;
}

/* ---------- Bio page: appointment form ---------- */

.appointment-form {
    max-width: 480px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 8px 28px -12px rgba(0, 0, 0, 0.18);
}

.appointment-form label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: #333;
}

.appointment-form .form-control {
    border-radius: 0.625rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid #ddd;
}

.appointment-form .form-control:focus {
    border-color: #673de6;
    box-shadow: 0 0 0 0.2rem rgba(103, 61, 230, 0.15);
}

.appointment-form .form-group {
    margin-bottom: 1rem;
}

.appointment-form .btn[type="submit"],
.appointment-form button[type="submit"] {
    width: 100%;
    padding: 0.8rem;
    border-radius: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.appointment-form button[type="submit"]:hover {
    filter: brightness(0.92);
    transform: translateY(-1px);
}

/* ---------- Bio page: "Powered by Synlinker" badge ---------- */

.synlinker-badge {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    color: #14121f;
    text-decoration: none;
    font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.2px;
    padding: 8px 16px;
    border-radius: 999px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    animation: synlinker-badge-in 0.5s ease 0.8s both;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.synlinker-badge:hover {
    color: #14121f;
    transform: translate(-50%, -2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}

.synlinker-badge .brand {
    color: #673de6;
}

@keyframes synlinker-badge-in {
    from {
        opacity: 0;
        transform: translate(-50%, 12px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* bio page footer: the fixed badge floats over the viewport bottom, so the
   footer needs enough clearance (badge ~34px tall + 16px offset) or the
   copyright line gets covered when scrolled to the end */
.bio-footer {
    width: 100%;
    padding-bottom: 76px !important;
}

.bio-footer p {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-bottom: 0;
}

/* Linktree-style footer nav on the public bio page (Report / Privacy /
   Terms / About this account / More from Synlinker) */
.bio-footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 8px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.bio-footer-nav a {
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.bio-footer-nav a:hover {
    text-decoration: underline;
}

/* "About this account" modal */
.about-account-modal {
    border: none;
    border-radius: 20px;
    box-shadow: 0 18px 50px rgba(20, 10, 60, 0.25);
}

.about-account-close {
    position: absolute;
    top: 14px;
    right: 14px;
}

.about-account-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #efeafc;
}

.about-account-facts {
    display: inline-block;
    margin: 0 auto;
}

.about-account-facts li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #3c3c4a;
    padding: 4px 0;
}

.about-account-facts svg {
    flex-shrink: 0;
    color: #673de6;
}

.about-account-modal a {
    color: #673de6;
}

@media (max-width: 576px) {
    .bio-footer {
        padding-bottom: 68px !important;
    }

    .bio-footer p {
        font-size: 0.72rem;
        padding: 0 1rem;
    }

    .bio-footer-nav {
        font-size: 0.74rem;
    }
}

/* ---------- Login / sign-up page ---------- */

.login-container .form-control:focus {
    border-color: #673de6;
    box-shadow: 0 0 0 0.2rem rgba(103, 61, 230, 0.15);
}

.login-container .btn-primary {
    background-color: #673de6;
    border-color: #673de6;
    font-weight: 600;
    border-radius: 0.75rem;
    transition: filter 0.15s ease, transform 0.15s ease;
}

.login-container .btn-primary:hover:not(:disabled) {
    background-color: #5a32cf;
    border-color: #5a32cf;
    transform: translateY(-1px);
}

.login-container .btn-primary:disabled {
    opacity: 0.7;
}

.login-container .btn-outline-light {
    font-weight: 600;
    border-radius: 0.75rem;
    border-width: 2px;
}

.overlay-panel h1 {
    font-weight: 700;
    letter-spacing: -0.01em;
}

.login-container a {
    color: #673de6;
}

/* ---------- Dashboard ---------- */

.main-content .content > h1 {
    font-size: 1.6rem;
    letter-spacing: -0.01em;
}

/* profile-link banner: keep the copy button reachable on small screens */
.profile-link .badge {
    font-size: 0.85rem;
    font-weight: 500;
}

.profile-link .badge .btn {
    white-space: nowrap;
}

/* sidebar footer avatar */
#nav-footer-avatar img {
    border-radius: 50%;
    object-fit: cover;
    width: 32px;
    height: 32px;
}

/* sidebar plan badge */
#nav-title .badge {
    background-color: #673de6 !important;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* generic dashboard buttons: subtle press feedback */
.main-content .btn {
    transition: transform 0.12s ease, filter 0.12s ease,
                background-color 0.15s ease, border-color 0.15s ease;
}

.main-content .btn:active {
    transform: scale(0.985);
}

/* ---------- Mobile ---------- */

@media (max-width: 576px) {
    .bio-avatar {
        width: 112px;
        height: 112px;
    }

    #contentSwitcher .nav-tabs {
        max-width: 100%;
    }

    #contentSwitcher .nav-tabs li a {
        padding: 9px 14px !important;
        font-size: 13.5px;
    }

    .appointment-form {
        padding: 1.1rem;
    }

    .product-list.frontEnd {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    /* preview.jsp sets height:80px inline on link buttons — too tall on phones */
    .custom-btn a[class*="btn-"] {
        height: 56px !important;
    }

    .synlinker-badge {
        font-size: 12px;
        padding: 7px 13px;
    }
}

@media (max-width: 360px) {
    #contentSwitcher .nav-tabs li a {
        padding: 8px 10px !important;
        font-size: 12.5px;
    }

    .product-list.frontEnd {
        grid-template-columns: 1fr;
    }
}

/* login page mobile: main.css stacks the panels full-width, but keeps the
   desktop translateX(100%) slide — which pushes a 100%-wide panel clean off
   the screen. Neutralise the horizontal slide and let opacity/z-index switch. */
@media (max-width: 766px) {
    .login-container.right-panel-active .sign-in-container,
    .login-container.right-panel-active .sign-up-container,
    .login-container.right-panel-active .overlay-container {
        transform: none;
    }

    .overlay-panel h1 {
        font-size: 1.25rem;
    }

    .overlay-panel .content {
        padding: 1.25rem 1rem;
        max-width: 92%;
    }

    .overlay-panel p {
        font-size: 0.85rem;
    }

    .form-container h1 {
        font-size: 1.5rem;
    }
}

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
    .synlinker-badge,
    .custom-btn a[class*="btn-"],
    .product-list.frontEnd > div,
    #contentSwitcher .tabslider {
        animation: none !important;
        transition: none !important;
    }
}
