/**
 * Category Profile Template - scoped styles.
 *
 * Every rule is scoped under the body.cpt-profile-active class (added via the
 * body_class filter) and/or the cpt- class prefix, so nothing leaks into the
 * rest of the WordPress site or the admin bar. Where the active theme is likely
 * to override our typography (h1, h2, a, p), we use !important on our OWN scoped
 * classes only - we never touch bare global tags.
 */

/* ---- Reset / canvas ----------------------------------------------------- */
body.cpt-profile-active {
        margin: 0 !important;
        padding: 0 !important;
        background: #e9ebf0 !important;
        color: #1c1f26;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        line-height: 1.5;
        /* Prevent any stray horizontal scroll on narrow viewports. */
        overflow-x: hidden;
}

body.cpt-profile-active * {
        box-sizing: border-box;
}

body.cpt-profile-active a {
        text-decoration: none;
}

/* Keep the WP admin bar from overlapping the card for logged-in users. */
body.cpt-profile-active.admin-bar .cpt-stage {
        padding-top: 46px;
}

/* ---- Stage (mobile canvas) --------------------------------------------- */
.cpt-stage {
        width: 100%;
        max-width: 430px;
        margin: 0 auto;
        padding: 0 0 28px;
        min-height: 100vh;
        background: #e9ebf0;
}

.cpt-card {
        position: relative;
}

/* ---- Hero --------------------------------------------------------------- */
.cpt-hero {
        position: relative;
        min-height: 470px;
        background-color: #2b2f38;
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        border-bottom-left-radius: 30px;
        border-bottom-right-radius: 30px;
        display: flex;
        align-items: flex-end;
        overflow: hidden;
}

.cpt-hero--no-image {
        background-image: linear-gradient(160deg, #4b5563 0%, #1f2430 100%);
}

.cpt-hero__content {
        position: relative;
        z-index: 2;
        width: 100%;
        /* Extra bottom padding so the name/location clear the sheet curve. */
        padding: 0 22px 42px;
        color: #fff;
}

/* ---- Name + verified badge --------------------------------------------- */
.cpt-name {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 0 0 10px !important;
        padding: 0 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 40px !important;
        line-height: 1.05 !important;
        font-weight: 800 !important;
        letter-spacing: -0.5px;
        color: #fff !important;
        text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4);
}

.cpt-name__text {
        white-space: nowrap;
}

.cpt-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
}

.cpt-badge__icon {
        width: 28px;
        height: 28px;
        display: block;
}

/* ---- Location ----------------------------------------------------------- */
.cpt-location {
        display: flex;
        align-items: center;
        gap: 7px;
        font-size: 17px;
        font-weight: 500;
        color: #f1f1f1;
        text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

.cpt-location__icon {
        flex: 0 0 auto;
        opacity: 0.95;
}

/* ---- White sheet (bottom sheet that overlaps the hero) ------------------ */
.cpt-sheet {
        position: relative;
        z-index: 5;
        margin-top: -30px;
        padding: 22px 16px 8px;
        background: #ffffff;
        border-top-left-radius: 30px;
        border-top-right-radius: 30px;
}

/* ---- Action buttons ----------------------------------------------------- */
.cpt-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 14px;
}

.cpt-btn {
        /* min-width:0 lets grid tracks shrink below content width (no overflow). */
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 15px 14px;
        border-radius: 20px;
        color: #fff !important;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.16);
        transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cpt-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 14px 28px rgba(0, 0, 0, 0.2);
}

.cpt-btn:active {
        transform: translateY(0);
}

.cpt-btn--write {
        background: linear-gradient(135deg, #6d5ef0 0%, #5a47e0 100%);
}

.cpt-btn--call {
        background: linear-gradient(135deg, #28c76f 0%, #1fae5d 100%);
}

.cpt-btn__icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        color: #fff;
        flex: 0 0 auto;
}

.cpt-btn__text {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
        min-width: 0;
}

.cpt-btn__title {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 19px;
        font-weight: 800;
        color: #fff !important;
}

.cpt-btn__sub {
        font-size: 12.5px;
        font-weight: 500;
        opacity: 0.92;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
}

/* ---- About me card ------------------------------------------------------ */
.cpt-about {
        margin: 16px 0 8px;
        padding: 22px 22px 24px;
        background: #f4f5f8;
        border-radius: 22px;
        box-shadow: 0 6px 18px rgba(20, 23, 33, 0.06);
}

.cpt-about__head {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 12px;
}

.cpt-about__quote {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: #e9e3fd;
        color: #6d5ef0;
        flex: 0 0 auto;
}

.cpt-about__title {
        margin: 0 !important;
        padding: 0 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 22px !important;
        font-weight: 800 !important;
        color: #1c1f26 !important;
}

.cpt-about__text {
        margin: 0 !important;
        padding: 0 !important;
        font-size: 17px !important;
        line-height: 1.6 !important;
        color: #3a3f4b !important;
}

/* ---- Empty state -------------------------------------------------------- */
.cpt-empty {
        padding: 60px 24px;
        text-align: center;
        color: #6b7280;
}

/* ---- Registration modal ------------------------------------------------- */
/* Lock background scroll while the modal is open. */
body.cpt-modal-lock {
        overflow: hidden !important;
}

.cpt-modal {
        position: fixed;
        inset: 0;
        z-index: 999999;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 16px;
}

.cpt-modal.cpt-modal--open {
        display: flex;
}

.cpt-modal__overlay {
        position: absolute;
        inset: 0;
        background: rgba(10, 12, 20, 0.62);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        opacity: 0;
        animation: cpt-fade-in 0.25s ease forwards;
}

.cpt-modal__dialog {
        position: relative;
        z-index: 1;
        width: 96vw;
        max-width: 520px;
        margin: 0 auto;
        background: #ffffff;
        border-radius: 30px;
        padding: 34px 28px 26px;
        text-align: center;
        box-shadow: 0 24px 60px rgba(10, 12, 20, 0.35);
        transform: scale(0.95);
        opacity: 0;
        animation: cpt-pop-in 0.25s ease forwards;
}

@keyframes cpt-fade-in {
        to {
                opacity: 1;
        }
}

@keyframes cpt-pop-in {
        to {
                transform: scale(1);
                opacity: 1;
        }
}

/* Close (X) button */
.cpt-modal__close {
        position: absolute;
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: none;
        border-radius: 50%;
        background: #f0f1f5;
        color: #6b7280;
        cursor: pointer;
        padding: 0;
        transition: background 0.15s ease, color 0.15s ease;
}

.cpt-modal__close:hover {
        background: #e4e6ec;
        color: #374151;
}

/* Lock icon with gradient + decorative sparks */
.cpt-modal__icon {
        position: relative;
        width: 100px;
        height: 92px;
        margin: 6px auto 22px;
}

.cpt-modal__icon-circle {
        position: absolute;
        top: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 78px;
        height: 78px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: linear-gradient(135deg, #6d5ef0 0%, #3aa0e8 45%, #28c76f 100%);
        box-shadow: 0 12px 26px rgba(109, 94, 240, 0.35);
}

.cpt-modal__spark {
        position: absolute;
        color: #8b7df3;
        font-size: 16px;
        line-height: 1;
        opacity: 0.85;
}

.cpt-modal__spark--1 {
        top: 6px;
        left: 12px;
        font-size: 14px;
}

.cpt-modal__spark--2 {
        top: 30px;
        left: 2px;
        font-size: 11px;
        color: #6d5ef0;
}

.cpt-modal__spark--3 {
        top: 18px;
        right: 8px;
        color: #28c76f;
        font-size: 13px;
}

/* Title */
.cpt-modal__title {
        margin: 0 0 12px !important;
        padding: 0 !important;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 23px !important;
        line-height: 1.3 !important;
        font-weight: 800 !important;
        color: #15181f !important;
}

/* Description */
.cpt-modal__desc {
        margin: 0 0 24px !important;
        padding: 0 12px !important;
        font-size: 16px !important;
        line-height: 1.55 !important;
        color: #6b7280 !important;
}

/* Sign Up button */
.cpt-modal__signup {
        display: block;
        width: 100%;
        padding: 18px 16px;
        border-radius: 18px;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 18px;
        font-weight: 800;
        color: #fff !important;
        text-align: center;
        background: linear-gradient(135deg, #6d5ef0 0%, #3aa0e8 50%, #28c76f 100%);
        box-shadow: 0 12px 26px rgba(58, 110, 230, 0.32);
        cursor: pointer;
        transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.cpt-modal__signup:hover {
        transform: translateY(-2px);
        box-shadow: 0 16px 32px rgba(58, 110, 230, 0.4);
}

.cpt-modal__signup:active {
        transform: translateY(0);
}

/* Not now button */
.cpt-modal__notnow {
        display: block;
        width: 100%;
        margin-top: 8px;
        padding: 14px 16px;
        border: none;
        background: transparent;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
        font-size: 16px;
        font-weight: 600;
        color: #98a0ad;
        cursor: pointer;
        transition: color 0.15s ease;
}

.cpt-modal__notnow:hover {
        color: #6b7280;
}

/* ---- Small screens ------------------------------------------------------ */
@media (max-width: 360px) {
        .cpt-name {
                font-size: 34px !important;
        }

        .cpt-btn__sub {
                display: none;
        }

        .cpt-modal__title {
                font-size: 21px !important;
        }
}
