
.tcp-profile-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 15px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.tcp-profile-card {
    background: #f5f5f5;
    max-width: 480px;
    width: 100%;
    border-radius: 18px;
    padding: 32px 24px 24px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.tcp-profile-logo {
    margin-bottom: 16px;
}

.tcp-logo-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: contain;
    background: #fff;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.tcp-profile-title {
    font-size: 24px;
    margin-bottom: 10px;
}

.tcp-profile-icons {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 24px;
}

.tcp-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    box-shadow: 0 3px 8px rgba(0,0,0,0.12);
}

.tcp-icon span.dashicons {
    font-size: 22px;
}

.tcp-profile-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.tcp-btn {
    display: block;
    width: 100%;
    border-radius: 999px;
    padding: 12px 18px;
    background: #ffffff;
    color: #333;
    text-decoration: none;
    border: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    cursor: pointer;
    font-size: 15px;
    transition: transform 0.1s ease, box-shadow 0.1s ease, background 0.1s ease;
}

.tcp-btn:hover {
    background: #f0f0f0;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
    transform: translateY(-1px);
}

.tcp-profile-footer {
    margin-top: 20px;
}

.tcp-footer-btn {
    display: inline-block;
    border-radius: 999px;
    padding: 10px 22px;
    background: #ffffff;
    color: #333;
    border: none;
    text-decoration: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
    font-size: 14px;
}

.tcp-story {
    margin-top: 30px;
    text-align: left;
}

.tcp-story h2 {
    font-size: 20px;
    margin-bottom: 10px;
}

.tcp-story-media img {
    max-width: 100%;
    border-radius: 12px;
    margin-top: 10px;
}

/* Form styling */
.tcp-profile-form {
    max-width: 720px;
    margin: 0 auto;
}

.tcp-profile-form h2 {
    margin-top: 24px;
    margin-bottom: 10px;
}

.tcp-profile-form h3 {
    margin-top: 16px;
    margin-bottom: 6px;
}

.tcp-profile-form p {
    margin-bottom: 12px;
}

.tcp-profile-form input[type="text"],
.tcp-profile-form input[type="email"],
.tcp-profile-form input[type="url"],
.tcp-profile-form input[type="number"],
.tcp-profile-form input[type="date"],
.tcp-profile-form textarea {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccd0d4;
    font-size: 14px;
}

.tcp-contact-card-row {
    border: 1px solid #e2e4e7;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    background: #fafafa;
}

/* Modals */
.tcp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
}

.tcp-modal.is-open {
    display: block;
}

.tcp-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
}

.tcp-modal-content {
    position: relative;
    max-width: 600px;
    margin: 60px auto;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    z-index: 2;
}

.tcp-modal-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: none;
    background: transparent;
    font-size: 24px;
    cursor: pointer;
}

.tcp-notice {
    max-width: 720px;
    margin: 0 auto 15px;
    padding: 10px 14px;
    border-radius: 4px;
}

.tcp-notice.tcp-success {
    background: #e0f7e9;
    border: 1px solid #7ad89c;
}

.tcp-notice.tcp-error {
    background: #ffe5e5;
    border: 1px solid #ff8c8c;
}

.tcp-rating label {
    margin-right: 8px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

/* Admin table */
.tcp-custom-buttons-table textarea {
    width: 100%;
}

/* Extra feature dependent sections */
.tcp-extra-file-section {
    margin-top: 18px;
}



.tcp-qr-section {
    margin-top: 24px;
    text-align: center;
}

.tcp-qr-section h2 {
    font-size: 20px;
    margin-bottom: 12px;
}

.tcp-qr-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.tcp-qr-image {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto 12px;
    border-radius: 14px;
    background: #fff;
}

.tcp-qr-caption {
    color: #555;
    margin-bottom: 12px;
}

.tcp-qr-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tcp-qr-btn {
    margin: 0;
}


.tcp-vcard-modal-content {
    max-width: 520px;
}

.tcp-vcard-help {
    margin-bottom: 14px;
    color: #555;
}

.tcp-vcard-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tcp-vcard-option {
    display: block;
    padding: 14px 16px;
    border-radius: 14px;
    background: #f7f7f7;
    text-decoration: none;
    color: #222;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.tcp-vcard-option:hover {
    background: #efefef;
}

.tcp-vcard-name {
    display: block;
    font-weight: 600;
    margin-bottom: 4px;
}

.tcp-vcard-meta {
    display: block;
    font-size: 13px;
    color: #666;
}


.tcp-owner-toolbar {
    max-width: 720px;
    margin: 10px auto 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.tcp-owner-btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 999px;
    background: #1d4ed8;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(29,78,216,0.25);
}

.tcp-owner-btn:hover {
    color: #fff;
    opacity: 0.95;
}

.tcp-owner-btn-secondary {
    background: #0f766e;
    box-shadow: 0 6px 16px rgba(15,118,110,0.22);
}

.tcp-extra-file-section,
.tcp-extra-gamification-section,
.tcp-extra-special-section {
    margin-top: 18px;
}

.tcp-extra-gamification-section select {
    width: 100%;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #ccd0d4;
    font-size: 14px;
}

.tcp-flipbook-modal-content {
    max-width: 900px;
}

.tcp-flipbook-wrap {
    min-height: 400px;
}

.tcp-game-showcase {
    margin: 12px 0 18px;
}

.tcp-game-rules {
    text-align: left;
    background: #fff;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.06);
}

.tcp-admin-readonly-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    padding: 10px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}


.tcp-popup-media {
    margin-bottom: 14px;
    text-align: center;
}

.tcp-popup-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.tcp-popup-shortcode {
    margin-bottom: 14px;
}

.tcp-custom-buttons-table .tcp-popup-image-preview img {
    max-width: 120px;
    height: auto;
    display: block;
}


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

.tcp-modal {
    overflow-y: auto;
    padding: 18px 15px 28px;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.tcp-modal.is-open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.tcp-modal-content {
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 46px);
    margin: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
    padding-bottom: 28px;
}

.tcp-modal-body,
.tcp-flipbook-wrap {
    max-width: 100%;
}

.tcp-flipbook-modal-content {
    max-width: 900px;
    max-height: calc(100vh - 46px);
}

@media (max-width: 767px) {
    .tcp-modal {
        padding: 10px 10px 22px;
    }

    .tcp-modal-content,
    .tcp-flipbook-modal-content {
        margin: 0;
        max-height: calc(100vh - 32px);
        padding: 18px 16px 26px;
    }
}


.tcp-btn-google {
    background: linear-gradient(45deg, #e74334, #fabd14, #31a44f, #4083f2);
    background-size: 300% 300%;
    color: #ffffff !important;
    border: none;
    border-radius: 8px;
    transition: background 0.4s ease-in-out;
    animation: tcpGradientBG 6s infinite linear alternate;
}

.tcp-btn-google:hover {
    color: #ffffff !important;
    filter: brightness(1.02);
}

@keyframes tcpGradientBG {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}


/* Hide the theme's default post title/meta above SMARTConneCT profiles */
body.single-tcp_profile .entry-header,
body.single-tcp_profile header.entry-header,
body.single-tcp_profile .entry-title,
body.single-tcp_profile .post-title,
body.single-tcp_profile .post-meta,
body.single-tcp_profile .entry-meta,
body.single-tcp_profile .byline,
body.single-tcp_profile .posted-on,
body.single-tcp_profile .elementor-widget-theme-post-title,
body.single-tcp_profile .elementor-widget-theme-post-info,
body.single-tcp_profile .elementor-widget-post-info {
    display: none !important;
}


/* v1.3.13 modal sizing + back link */
body.tcp-modal-open {
    overflow: hidden;
}

.tcp-modal {
    padding-top: 56px !important;
    padding-right: 14px !important;
    padding-bottom: 28px !important;
    padding-left: 14px !important;
    box-sizing: border-box;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

body.admin-bar .tcp-modal {
    padding-top: 72px !important;
}

.tcp-modal.is-open {
    display: flex !important;
    align-items: flex-start !important;
    justify-content: center !important;
}

.tcp-modal-content,
.tcp-flipbook-modal-content,
.tcp-vcard-modal-content {
    width: 100%;
    margin: 0 auto !important;
    max-height: calc(100vh - 84px) !important;
    overflow-y: auto !important;
    box-sizing: border-box;
    padding-top: 52px !important;
    padding-bottom: 26px !important;
}

body.admin-bar .tcp-modal-content,
body.admin-bar .tcp-flipbook-modal-content,
body.admin-bar .tcp-vcard-modal-content {
    max-height: calc(100vh - 104px) !important;
}

.tcp-modal-back {
    position: absolute;
    left: 14px;
    top: 12px;
    border: none;
    background: transparent;
    color: #1d4ed8;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    padding: 4px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
}

.tcp-modal-back:hover {
    color: #14389a;
}

.tcp-modal-close {
    top: 8px !important;
}

@media (max-width: 767px) {
    .tcp-modal {
        padding-top: 44px !important;
        padding-right: 8px !important;
        padding-bottom: 16px !important;
        padding-left: 8px !important;
    }

    body.admin-bar .tcp-modal {
        padding-top: 60px !important;
    }

    .tcp-modal-content,
    .tcp-flipbook-modal-content,
    .tcp-vcard-modal-content {
        max-height: calc(100vh - 60px) !important;
        padding-top: 48px !important;
        padding-bottom: 20px !important;
        border-radius: 10px !important;
    }

    body.admin-bar .tcp-modal-content,
    body.admin-bar .tcp-flipbook-modal-content,
    body.admin-bar .tcp-vcard-modal-content {
        max-height: calc(100vh - 78px) !important;
    }

    .tcp-modal-back {
        left: 12px;
        top: 10px;
        font-size: 14px;
    }
}


/* v1.3.14 keep modal close/back controls always visible */
.tcp-modal-close,
.tcp-modal-back {
    opacity: 1 !important;
    visibility: visible !important;
    color: #1f2937 !important;
    text-decoration: none !important;
    text-shadow: none !important;
    z-index: 5;
}

.tcp-modal-close {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    font-size: 24px !important;
    line-height: 1 !important;
}

.tcp-modal-back {
    background: rgba(255,255,255,0.96) !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    border-radius: 999px !important;
    padding: 8px 14px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}

.tcp-modal-close:hover,
.tcp-modal-back:hover,
.tcp-modal-close:focus,
.tcp-modal-back:focus {
    color: #111827 !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: #ffffff !important;
}


.tcp-coupon-field {
    margin-top: 22px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.tcp-coupon-field input[type="text"] {
    max-width: 320px;
    text-transform: uppercase;
}

.tcp-coupon-applies-grid {
    column-count: 2;
    max-width: 760px;
}

@media (max-width: 782px) {
    .tcp-coupon-applies-grid {
        column-count: 1;
    }
}

/* SMARTConneCT + Gamify bridge states */
.tcp-gamify-unlocking {
    opacity: 0.72;
    pointer-events: none;
}

.tcp-gamify-unlocked {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}

/* SMARTConneCT Gamify modal integration */
.tcp-gamify-modal-content {
    max-width: 560px;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
}

.tcp-gamify-modal .fs-gam-campaign {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

.tcp-gamify-modal .fs-gam-game-select,
.tcp-gamify-modal .fs-gam-selected-game,
.tcp-gamify-modal .fs-gam-result {
    margin-left: auto;
    margin-right: auto;
}

/* v1.3.25 Elementor template support inside SMARTConneCT extra popups */
.tcp-extra-modal-content {
    max-width: 760px !important;
}

.tcp-extra-modal-body {
    max-width: 100%;
}

.tcp-popup-shortcode,
.tcp-popup-shortcode .elementor,
.tcp-popup-shortcode .elementor-section,
.tcp-popup-shortcode .elementor-container,
.tcp-popup-shortcode .e-con {
    max-width: 100%;
}

.tcp-popup-shortcode img {
    max-width: 100%;
    height: auto;
}

.tcp-popup-shortcode .elementor-widget-wrap,
.tcp-popup-shortcode .elementor-element {
    box-sizing: border-box;
}
