/**
 * SoCap Contact Pilot
 *
 * Sits in the profile sidebar (desktop) where the old "Claim this
 * profile" banner used to be, and stays pinned on scroll.
 *
 * @package SoCap
 */

/* -------------------------------------------------------------------------
   01. CONNECT CARD
   ---------------------------------------------------------------------- */

.socap-connect {
    display: block;
}

/* Integrated into the profile card: no inner box, just heading + actions. */

.socap-connect-title {
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 12px;
    color: var(--socapai-black, #09090b);
}

.socap-connect-name {
    color: var(--socapai-black, #09090b);
}

/* Two options side by side, price baked into each button */

.socap-connect-actions {
    display: flex;
    flex-direction: row;
    gap: 10px;
}

.socap-offer-list {
    display: grid;
    gap: 4px;
    margin-bottom: 12px;
}

.socap-offer-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    margin: 0;
    padding: 12px 13px;
    border: 1px solid #e4e4e7;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, 0.035);
    overflow: hidden;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

/* Override the global <article> spacing rules from style.css so offer
   cards sit tightly together and keep consistent bottom padding. */
.socap-offer-card,
.socap-offer-card:last-child {
    margin-bottom: 10px;
    padding-bottom: 13px;
    border-bottom: 1px solid #e4e4e7;
}

.socap-offer-card:hover {
    border-color: #c4b5fd;
    box-shadow: 0 6px 16px -10px rgba(124, 58, 237, 0.22);
}

.socap-offer-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.socap-offer-card__type {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--socapai-muted, #71717a);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.045em;
    line-height: 1.3;
    text-transform: uppercase;
}

.socap-offer-icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    stroke-width: 1.8;
}

.socap-offer-card__price {
    flex: 0 0 auto;
    padding: 2px 8px;
    border-radius: 7px;
    background: #f4f4f5;
    color: var(--socapai-black, #09090b);
    font-size: 0.78rem;
    font-weight: 750;
    font-variant-numeric: tabular-nums;
    line-height: 1.3;
    text-align: right;
}

.socap-offer-card__price--free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: var(--socap-green-hover, #15803d);
}

.socap-offer-card__price-old {
    color: #a1a1aa;
    font-weight: 500;
}

.socap-network-vip-badge {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 8px 11px;
    border: 1px solid var(--socap-green-border, #bbf7d0);
    border-radius: 10px;
    background: var(--socap-green-subtle, #f0fdf4);
    color: var(--socap-green-hover, #15803d);
    font-size: 0.74rem;
    font-weight: 650;
    line-height: 1.35;
}

.socap-network-vip-badge__icon {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
}

.socap-offer-card .socap-btn {
    min-height: 40px;
    margin-top: 0;
    padding: 9px 12px;
    font-size: 0.78rem;
}

.socap-offer-button__icon {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    stroke-width: 1.8;
}

.socap-offer-card .socap-btn-secondary {
    border-width: 1px;
}

.socap-connect-note {
    font-size: 0.72rem;
    color: var(--socapai-muted, #71717a);
    text-align: center;
    margin: 12px 0 0;
    line-height: 1.45;
}

.socap-connect-note strong {
    color: var(--socapai-black, #09090b);
}

.socap-note-main {
    display: block;
}

.socap-note-sub {
    display: block;
    margin-top: 3px;
    font-size: 0.68rem;
}

.socap-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    border: none;
    border-radius: 10px;
    padding: 11px 14px;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.2;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

/* Buttons in the connect row stack label + price and split the width evenly */

.socap-connect-actions .socap-btn {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
    padding: 10px 8px;
    text-align: center;
}

.socap-btn-label {
    font-size: 0.84rem;
    font-weight: 650;
    line-height: 1.2;
}

.socap-btn-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.socap-btn-icon {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.socap-btn-price {
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.1;
    opacity: 0.72;
}

.socap-btn-primary {
    background: linear-gradient(135deg, #251f3b 0%, #141221 100%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.socap-btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    color: #ffffff;
}

.socap-btn-primary:hover .socap-btn-price {
    opacity: 0.9;
}

.socap-btn-secondary {
    background: #ffffff;
    color: var(--socapai-black, #09090b);
    border: 1px solid #d4d4d8;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}

.socap-btn-secondary:hover {
    background: var(--socapai-black, #09090b);
    border-color: var(--socapai-black, #09090b);
    color: #ffffff;
}

.socap-btn-secondary:hover .socap-btn-price {
    opacity: 0.9;
}

.socap-btn-arrow {
    transition: transform 0.18s ease;
}

.socap-btn:hover .socap-btn-arrow {
    transform: translateX(3px);
}

/* Verification landing notice */

.socap-connect-notice {
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.82rem;
    margin-bottom: 10px;
    line-height: 1.45;
}

.socap-connect-notice.is-success {
    background: var(--socap-green-subtle, #f0fdf4);
    border: 1px solid var(--socap-green-border, #bbf7d0);
    color: var(--socap-green-hover, #15803d);
}

.socap-connect-notice.is-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

/* -------------------------------------------------------------------------
   02. STICKY BEHAVIOUR (desktop)
   The Connect block pins itself while the rest of the profile scrolls.
   ---------------------------------------------------------------------- */

@media (min-width: 992px) {
    .profile-sidebar.profile-card-header {
        position: static;
    }

    .socap-connect {
        position: sticky;
        top: 76px;
        z-index: 30;
    }
}

@media (max-width: 991px) {
    .socap-connect {
        margin: 18px 0;
    }
}

/* -------------------------------------------------------------------------
   03. MODALS
   ---------------------------------------------------------------------- */

.socap-modal {
    position: fixed;
    inset: 0;
    z-index: 99990;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

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

.socap-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(9, 9, 11, 0.56);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

.socap-modal-panel {
    position: relative;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 18px;
    padding: 26px 24px 20px;
    box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45);
    animation: socapModalIn 0.22s ease;
}

@keyframes socapModalIn {
    from {
        opacity: 0;
        transform: translateY(8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.socap-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: none;
    background: var(--socapai-light, #f4f4f5);
    color: #52525b;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.socap-modal-close:hover {
    background: var(--socapai-border, #e4e4e7);
    color: var(--socapai-black, #09090b);
}

.socap-modal-eyebrow {
    display: inline-block;
    font-size: 0.66rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--yc-orange, #7c3aed);
    margin-bottom: 6px;
}

.socap-modal-title {
    font-size: 1.3rem;
    font-weight: 750;
    margin: 0 0 6px;
    color: var(--socapai-black, #09090b);
}

.socap-modal-sub {
    font-size: 0.9rem;
    color: var(--socapai-muted, #71717a);
    margin: 0 0 18px;
    line-height: 1.5;
}

.socap-modal-fineprint {
    font-size: 0.7rem;
    color: #a1a1aa;
    text-align: center;
    margin: 14px 0 0;
}

.socap-modal-disclaimer {
    font-size: 0.7rem;
    color: #a1a1aa;
    text-align: center;
    line-height: 1.5;
    margin: 8px 0 0;
}

.socap-modal-disclaimer strong {
    color: #52525b;
    font-weight: 600;
}

body.socap-modal-open {
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   04. FORMS
   ---------------------------------------------------------------------- */

.socap-contact-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.socap-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.socap-field-row {
    display: flex;
    gap: 12px;
}

.socap-field-row .socap-field {
    flex: 1;
    min-width: 0;
}

.socap-field-label {
    font-size: 0.8rem;
    font-weight: 650;
    color: var(--socapai-dark, #18181b);
}

.socap-field-label em {
    color: var(--yc-orange, #7c3aed);
    font-style: normal;
}

.socap-optional {
    color: #a1a1aa;
    font-weight: 500;
}

.socap-field input[type="text"],
.socap-field input[type="email"],
.socap-field input[type="date"],
.socap-field textarea {
    width: 100%;
    border: 1px solid var(--socapai-border, #e4e4e7);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    color: var(--socapai-black, #09090b);
    background: #ffffff;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.socap-field textarea {
    resize: vertical;
    min-height: 96px;
}

.socap-field input:focus,
.socap-field textarea:focus {
    outline: none;
    border-color: var(--yc-orange, #7c3aed);
    box-shadow: 0 0 0 3px var(--yc-orange-glow, rgba(124, 58, 237, 0.18));
}

.socap-field-hint {
    font-size: 0.74rem;
    color: #a1a1aa;
}

.socap-consent {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 0.8rem;
    color: #52525b;
    line-height: 1.45;
    cursor: pointer;
}

.socap-consent input {
    margin-top: 2px;
    width: 16px;
    height: 16px;
    flex: none;
    accent-color: var(--yc-orange, #7c3aed);
}

.socap-consent a {
    color: var(--socapai-black, #09090b);
    text-decoration: underline;
}

.socap-price-note {
    background: var(--yc-orange-subtle, #f5f3ff);
    border: 1px solid var(--yc-orange-border, #ddd6fe);
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 0.8rem;
    color: #4c1d95;
    line-height: 1.5;
}

.socap-price-note strong {
    color: #5b21b6;
}

.socap-submit {
    margin-top: 2px;
}

.socap-submit.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

.socap-form-feedback {
    margin: 0;
    font-size: 0.82rem;
}

.socap-form-feedback.is-error {
    color: #dc2626;
}

.socap-form-feedback.is-success {
    color: var(--socap-green-hover, #15803d);
}

/* Success state */

.socap-form-success {
    text-align: center;
    padding: 8px 4px 4px;
}

.socap-form-success .socap-success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--socap-green-subtle, #f0fdf4);
    color: var(--socap-green, #16a34a);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.socap-form-success h4 {
    font-size: 1.1rem;
    margin: 0 0 6px;
    color: var(--socapai-black, #09090b);
}

.socap-form-success p {
    font-size: 0.88rem;
    color: var(--socapai-muted, #71717a);
    margin: 0;
    line-height: 1.55;
}

/* -------------------------------------------------------------------------
   05. RESPONSIVE
   ---------------------------------------------------------------------- */

@media (max-width: 560px) {
    .socap-field-row {
        flex-direction: column;
        gap: 14px;
    }

    .socap-modal {
        padding: 12px;
    }

    .socap-modal-panel {
        padding: 22px 16px 16px;
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .socap-modal-panel {
        animation: none;
    }

    .socap-btn,
    .socap-btn-arrow {
        transition: none;
    }
}
