/* ==============================================================
 * CUSTOM MY ACCOUNT
 * ============================================================== */

/* --------------------------------------------------------------
 * CSS VARIABLES
 * -------------------------------------------------------------- */
:root {
    --site-color: #ec6624;
    --site-color-dark: #7C154A;
}


/* ==============================================================
 * 1. BONUS REPEATABLE ROWS (Admin / Edit UI)
 * ============================================================== */
#bonus_repeatable_wrapper .bonus_repeatable_row {
    display: grid !important;
    grid-template-columns: 90px 130px 140px 230px 200px auto 90px !important;
    align-items: center !important;
    gap: 10px !important;
    border: 1px solid #ddd !important;
    padding: 8px !important;
    margin-bottom: 5px !important;
    position: relative !important;
}

#bonus_repeatable_wrapper .bonus_repeatable_row input[type="number"] { width: 100%; }
#bonus_repeatable_wrapper .bonus_repeatable_row select { width: 100%; }
#bonus_repeatable_wrapper .bonus_repeatable_row .bonus_prize { width: 100%; }
#bonus_repeatable_wrapper .bonus_repeatable_row .bonus_label { width: 100%; }

#bonus_repeatable_wrapper .bonus_repeatable_row .remove_bonus_row {
    justify-self: end;
}

#bonus_repeatable_wrapper {
    margin-top: 10px !important;
    padding: 10px !important;
}

#add_bonus_row {
    margin-top: 10px !important;
    margin-left: 10px !important;
}


/* ==============================================================
 * 2. BONUS GIFT FIELDS
 * ============================================================== */
.bonus-gift-fields {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
}
.bonus-gift-fields { display: flex; align-items: center; gap: 6px; }

.bonus_gift_product_results {
    position: absolute; top: 100%; left: 0; z-index: 100;
    background: #fff; border: 1px solid #ddd; max-height: 180px;
    overflow-y: auto; width: 220px; display: none;
}
.bonus-gift-result-item { padding: 4px 8px; cursor: pointer; border-bottom: 1px solid #eee; }
.bonus-gift-result-item:hover { background: #f0f0f0; }


/* ==============================================================
 * 3. BONUS IMAGE
 * ============================================================== */
.bonus-image-box {
    position: relative;
    display: inline-block;
}

.bonus_image_preview {
    width: 60px;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.remove_bonus_image {
    position: absolute;
    top: -6px;
    left: 55px;
    background: #d63638;
    color: #fff;
    width: 18px;
    height: 18px;
    line-height: 15px;
    text-align: center;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}


/* ==============================================================
 * 4. BONUS TABLE
 * ============================================================== */
.bonus-table thead { font-size: 16px; }
.bonus-table tbody { font-size: 14px; }
.bonus-table .bonus-image-container img { transition: transform 0.2s ease; }
.bonus-table .bonus-image-container img:hover { transform: scale(1.05); }
.bonus-table .product-link:hover { color: #0d6efd; }


/* ==============================================================
 * 5. MY ACCOUNT — BONUS CONTENT (Pagination / Tabs / Tables)
 * ============================================================== */
.woocommerce-MyAccount-content-bonus .page-item.active {
    background-color: var(--site-color);
    border-radius: 6px;
}
.woocommerce-MyAccount-content-bonus .page-item.active .page-link {
    background-color: var(--site-color);
    border-color: var(--site-color);
    color: white !important;
}
.woocommerce-MyAccount-content-bonus .nav-tabs .nav-link.active {
    color: var(--site-color);
    border-color: var(--site-color) var(--site-color) #fff;
    font-weight: 600;
}
.woocommerce-MyAccount-content-bonus .nav-tabs .nav-link { color: #333; }

/* Align the plugin's own instant-win table with the bonus table look */
.woocommerce-MyAccount-content-bonus .lty-frontend-table {
    width: 100%;
    border-collapse: collapse;
}
.woocommerce-MyAccount-content-bonus .lty-frontend-table th,
.woocommerce-MyAccount-content-bonus .lty-frontend-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #dee2e6;
}
.woocommerce-MyAccount-content-bonus .lty-frontend-table thead { font-size: 16px; }
.woocommerce-MyAccount-content-bonus .lty-frontend-table tbody { font-size: 14px; }


/* ==============================================================
 * 6. BONUS TABLE — RESPONSIVE (max-width: 768px)
 * ============================================================== */
@media (max-width: 768px) {
    .bonus-table thead { display: none; }
    .bonus-table,
    .bonus-table tbody,
    .bonus-table tr,
    .bonus-table td {
        display: block; width: 100%;
    }
    .bonus-table tr {
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.375rem;
        padding: 0.75rem;
    }
    .bonus-table td {
        text-align: right;
        padding: 0.5rem 0;
        border: none;
        border-bottom: 1px solid #dee2e6;
        position: relative;
        padding-left: 50%;
    }
    .bonus-table td:last-child { border-bottom: none; }
    .bonus-table td:before {
        content: attr(data-label) !important;
        position: absolute;
        left: 0.75rem;
        width: 45%;
        padding-right: 10px;
        font-weight: 600;
        text-align: left;
        color: #495057;
    }
    .bonus-table td:first-child { padding-left: 0.75rem; text-align: left !important; }
    .bonus-table td:first-child:before { display: none; }
    .bonus-table .d-flex { flex-direction: column !important; align-items: flex-start !important; }
    .bonus-table .flex-shrink-0 { margin-bottom: 1rem; }
}


/* ==============================================================
 * 7. CARPATIC ACCOUNT TABS
 * ============================================================== */
.carpatic-account-tabs {
    margin-top: 1rem;
}
.carpatic-tab-nav {
    display: flex;
    gap: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 1.5rem;
}
.carpatic-tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 0.75rem 1.25rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    color: #6b6b6b;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.carpatic-tab-btn:hover {
    color: #202124;
}
.carpatic-tab-btn.is-active {
    color: #202124;
    border-bottom-color: var(--site-color);
}

/* Tab panels */
.carpatic-tab-account-panel {
    display: none;
    animation: carpatic-fade-in 0.15s ease;
}
.carpatic-tab-account-panel.is-active {
    display: block;
}
@keyframes carpatic-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}


/* ==============================================================
 * 8. INSTANT WINS PANE — COLUMN HIDING
 * ============================================================== */
.instant-wins-pane td[data-title="Duration"] { display: none; }
.instant-wins-pane thead tr th:nth-child(2) { display: none; }
.instant-wins-pane thead tr th:nth-child(3) { display: none; }


/* ==============================================================
 * 9. SURPRISE CONTACT FORM
 * ============================================================== */
.surprise-contact-wrapper {
    background: #fff;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-top: 1rem;
}
.surprise-header {
    text-align: center;
    margin-bottom: 30px;
}
.surprise-header h2 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}
.surprise-header p {
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}
.surprise-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}
.surprise-form .form-group {
    flex: 1;
}
.surprise-form .form-group.full-width {
    flex: 100%;
}

/* Standard inputs & textarea */
.surprise-form input[type="text"]:not(#editPhoneNrSurprise),
.surprise-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
    height: 55px;
}
.surprise-form textarea {
    height: auto;
    min-height: 100px;
    resize: vertical;
}
.surprise-form input:focus,
.surprise-form textarea:focus {
    border-color: var(--site-color);
    outline: none;
}

/* Phone field — floating label */
.field-container {
    position: relative;
    margin-bottom: 5px;
}
.field-container input {
    width: 100%;
    padding: 18px 15px 6px 15px !important;
    height: 55px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-size: 15px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s;
}
.field-container input:focus {
    border-color: var(--site-color);
    outline: none;
}
.field-container label.botb-placeholder-label {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 15px;
    color: #999;
    pointer-events: none;
    transition: all 0.2s ease;
    margin: 0;
    font-weight: normal;
}
.field-container input:focus + label.botb-placeholder-label,
.field-container label.botb-placeholder-label.active {
    top: 1px;
    font-size: 11px;
    color: #666;
    transform: none;
}

/* Validation message */
#CustomPhoneValidationMessageSurprise {
    font-size: 12px;
    margin-top: 5px;
    display: block;
    color: #28a745;
}
#CustomPhoneValidationMessageSurprise.text-danger {
    color: #dc3545;
}

/* Bootstrap-style alerts */
.alert {
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    display: none;
}
.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Actions & buttons */
.surprise-form .form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}
.surprise-save-btn {
    background: var(--site-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 12px 35px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.2s;
}
.surprise-save-btn:hover {
    background: #c21d73;
}
.surprise-save-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .surprise-form .form-row {
        flex-direction: column;
        gap: 15px;
    }
}


/* ==============================================================
 * 10. account details page
 * ============================================================== */
 
 /* Hide standard WooCommerce dashboard paragraph if it exists */
.woocommerce-MyAccount-content > p{
    display: none !important;
}

/* --- Account List (Dashboard) --- */
.carpatic-account-list {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-top: 1rem;
}
.carpatic-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease;
}
.carpatic-list-item:last-child {
    border-bottom: none;
}
.carpatic-list-item:hover {
    background: #f9f9f9;
}
.carpatic-list-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #202124;
    font-family: inherit;
}
.carpatic-list-subtitle {
    font-size: 14px;
    color: #6b6b6b;
    line-height: 1.4;
}
.carpatic-list-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

/* --- Breadcrumbs (Sub-pages) --- */
.carpatic-breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.carpatic-breadcrumb a {
    color: var(--site-color); /* Brand color */
    text-decoration: none;
}
.carpatic-breadcrumb a:hover {
    text-decoration: underline;
}
.carpatic-breadcrumb .separator {
    margin: 0 8px;
    color: var(--site-color);
}
.carpatic-breadcrumb .current {
    color: #A0A0A0;
}

/* Hide default WooCommerce breadcrumbs if active */
.woocommerce-breadcrumb {
    display: none !important;
}

/* --- Form Styling --- */
.woocommerce-address-fields .form-row label,
.woocommerce-EditAccountForm .form-row label {
    margin-bottom: 2px !important;
    display: block !important;
}
.woocommerce-address-fields .form-row input,
.woocommerce-address-fields .form-row select {
    margin-top: 0;
}
.woocommerce-address-fields > p:last-child,
.woocommerce-EditAccountForm > p:last-child {
    margin-top: 1.5rem;
    text-align: right;
}
.woocommerce-address-fields button[name="save_address"],
.woocommerce-EditAccountForm button[name="save_account_details"] {
    border-radius: 6px;
}
 
/* ==============================================================
 * 11. SAFE PLAY
 * ============================================================== */
.safe-play-wrapper { max-width: 100%; padding: 0; }

/* Header */
.safe-play-wrapper .safe-play-header { margin-bottom: 20px; }
.safe-play-wrapper .safe-play-tagline { color: #666; font-size: 14px; margin: 0; line-height: 1.6; }
.safe-play-wrapper .learn-more-link { color: var(--site-color); text-decoration: none; }
.safe-play-wrapper .learn-more-link:hover { text-decoration: underline; }

/* Section shell */
.safe-play-wrapper .safe-play-section {
    background: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 30px;
    margin-bottom: 20px;
}
.safe-play-wrapper .safe-play-section h3 { font-size: 20px; font-weight: 700; margin: 0 0 6px 0; color: #1F2937; }
.safe-play-wrapper .section-description { color: #6B7280; font-size: 14px; line-height: 1.5; margin: 0 0 30px 0; }

/* Notices */
.safe-play-wrapper .pause-notice {
    background: #FEF3C7; border: 1px solid #FDE68A;
    border-radius: 6px; padding: 12px 16px;
    margin-bottom: 20px; color: #92400E; font-size: 13px; line-height: 1.5;
}
.safe-play-wrapper .lock-notice {
    background: var(--site-color); border: 1px solid var(--site-color);
    border-radius: 6px; padding: 12px 16px; margin-top: 14px;
    color: #ffffff; font-size: 13px; line-height: 1.6;
}
.safe-play-wrapper .lock-notice p { margin: 0; }
.safe-play-wrapper .lock-notice p + p { margin-top: 4px; }
.safe-play-wrapper .lock-notice a { color: black !important; }

.safe-play-wrapper .edit-notice {
    display: flex; gap: 8px; align-items: flex-start;
    font-size: 13px; line-height: 1.5;
    margin-top: 10px;
}

/* Slider shell */
.safe-play-wrapper .slider-wrapper { margin-bottom: 30px; }
.safe-play-wrapper .slider-track-container { position: relative; padding-top: 35px; margin-bottom: 10px; }

.safe-play-wrapper .cap-limit-label {
    position: absolute; top: 0;
    background: #212529; color: #ffffff;
    padding: 6px 14px; border-radius: 6px;
    font-size: 13px; font-weight: 500;
    white-space: nowrap; transition: left 0.1s ease;
    pointer-events: none; z-index: 2;
}

/* Range input base */
.safe-play-wrapper input[type="range"] {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 8px;
    background: #E5E7EB; border-radius: 4px;
    outline: none; margin: 0; cursor: pointer;
}
.safe-play-wrapper input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 22px; height: 22px;
    background: white; border: 3px solid var(--site-color);
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: transform 0.1s ease;
}
.safe-play-wrapper input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.1); }
.safe-play-wrapper input[type="range"]::-moz-range-thumb {
    width: 22px; height: 22px;
    background: white; border: 3px solid var(--site-color);
    border-radius: 50%; cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    transition: transform 0.1s ease;
}
.safe-play-wrapper input[type="range"]::-moz-range-thumb:hover { transform: scale(1.1); }
.safe-play-wrapper input[type="range"]:disabled { opacity: 0.5; cursor: not-allowed; }
.safe-play-wrapper input[type="range"]:disabled::-webkit-slider-thumb,
.safe-play-wrapper input[type="range"]:disabled::-moz-range-thumb { cursor: not-allowed; }

/* Range slider fill — cap + pause sliders use --slider-pos to control progress */
.safe-play-wrapper input[type="range"].slider-progress,
.safe-play-wrapper #pause-duration-slider {
    background: linear-gradient(
        to right,
        var(--site-color) 0%,
        var(--site-color) var(--slider-pos, 0%),
        #E5E7EB var(--slider-pos, 0%),
        #E5E7EB 100%
    );
}

.safe-play-wrapper .slider-min-max {
    display: flex; justify-content: space-between;
    font-size: 13px; color: #9CA3AF; margin-top: 8px;
}

/* Pause slider */
.safe-play-wrapper .pause-slider-wrapper { margin-bottom: 25px; width: 100%; }
.safe-play-wrapper .pause-slider-container { position: relative; margin-bottom: 0; }
.safe-play-wrapper #pause-duration-slider { width: 100%; box-sizing: border-box; }

.safe-play-wrapper .pause-duration-labels {
    display: flex;
    box-sizing: border-box; margin-top: 10px;
    justify-content: space-between;
}
.safe-play-wrapper .pause-segment { position: relative; text-align: center; padding-top: 14px; }
.safe-play-wrapper .pause-segment::before {
    content: ''; position: absolute;
    top: 0; left: 50%; transform: translateX(-50%);
    width: 2px; height: 15px; background: #D1D5DB;
}
.safe-play-wrapper .pause-segment:first-child { text-align: left; }
.safe-play-wrapper .pause-segment:first-child::before { left: 2px; transform: none; }
.safe-play-wrapper .pause-segment:last-child { text-align: right; }
.safe-play-wrapper .pause-segment:last-child::before { left: auto; right: 2px; transform: none; }

.safe-play-wrapper .pause-segment span {
    display: inline-block; color: #6B7280; font-size: 13px;
    font-weight: 400; line-height: 1.3; cursor: pointer;
    transition: color 0.2s ease; white-space: nowrap;
    width: 50px;
}
.safe-play-wrapper .pause-segment span.active { color: #111827; font-weight: 700; }
.safe-play-wrapper .pause-segment:has(span.active)::before { background: #9CA3AF; }
.safe-play-wrapper .pause-segment span:hover { color: #374151; }

/* Pause timer */
.safe-play-wrapper #pause-timer-view { display: flex; justify-content: center; }
.safe-play-wrapper .pause-timer-box {
    background: var(--site-color);
    border: 1px solid var(--site-color);
    border-radius: 10px;
    padding: 24px 20px;
    text-align: center;
    margin-bottom: 24px;
}
.safe-play-wrapper .pause-timer-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 16px;
    letter-spacing: 0.3px;
}
.safe-play-wrapper .pause-timer-countdown {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 4px;
    margin-bottom: 14px;
}
.safe-play-wrapper .countdown-box { color: #fff; }
.safe-play-wrapper .pause-timer-until { font-size: 13px; color: #ffffff; }

.safe-play-wrapper #pause-extend-actions { display: none; gap: 10px; justify-content: flex-end; }
.safe-play-wrapper #pause-extend-actions.visible { display: flex !important; }

@media (max-width: 768px) {
    .safe-play-wrapper .timer-num { font-size: 26px; min-width: 40px; padding: 6px 4px; }
    .safe-play-wrapper .timer-sep { font-size: 22px; }
}

/* Checkboxes */
.safe-play-wrapper .pause-options-checkboxes { display: flex; gap: 30px; margin-bottom: 25px; }
.safe-play-wrapper .checkbox-option { display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.safe-play-wrapper .checkbox-option input[type="checkbox"] { width: 20px; height: 20px; cursor: pointer; accent-color: var(--site-color); margin: 0; }
.safe-play-wrapper .checkbox-option input[type="checkbox"]:disabled { cursor: not-allowed; opacity: 0.5; }
.safe-play-wrapper .checkbox-text { font-size: 15px; color: #1F2937; }

/* Form actions */
.safe-play-wrapper .form-actions { display: flex; justify-content: flex-end; margin-top: 0; }
.safe-play-wrapper #cap-edit-actions { display: none; }
.safe-play-wrapper #cap-edit-actions.visible { display: flex !important; gap: 10px; justify-content: flex-end; }

/* Buttons */
.safe-play-wrapper .lock-button {
    background: #212529; color: white;
    border: none; border-radius: 6px;
    padding: 11px 50px; font-size: 15px; font-weight: 600;
    cursor: pointer; transition: background 0.2s;
    min-width: 150px; text-decoration: none;
    display: inline-block; text-align: center;
}
.safe-play-wrapper .lock-button:hover { background: #424649; color: white; }
.safe-play-wrapper .lock-button:active { transform: translateY(1px); }

.safe-play-wrapper .lock-button.edit-cap-btn,
.safe-play-wrapper .extend-pause-btn {
    background: #212529;
    border: 2px solid #212529;
    color: #ffffff;
}
.safe-play-wrapper .lock-button.edit-cap-btn:hover,
.safe-play-wrapper .extend-pause-btn:hover { background: #424649; color: white; }

.safe-play-wrapper .sp-btn {
    padding: 11px 28px; border-radius: 6px;
    font-size: 15px; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s;
}

.safe-play-wrapper .locked-message {
    background: #D1FAE5; border: 1px solid #A7F3D0;
    color: #065F46; padding: 11px 24px;
    border-radius: 6px; font-size: 14px; font-weight: 500;
    display: inline-block;
}
.safe-play-wrapper .safe-play-form.locked { opacity: 0.6; }

.safe-play-wrapper .sp-btn-danger {
    background: transparent;
    border: 2px solid #DC2626;
    color: #DC2626;
    padding: 11px 28px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.safe-play-wrapper .sp-btn-danger:hover {
    background: #DC2626;
    color: white;
}

/* Safe Play — Responsive */
@media (max-width: 768px) {
    .page-id-10.woocommerce-account .wp-block-group.alignfull.has-global-padding { padding: 10px !important; }
    .safe-play-wrapper .safe-play-section { padding: 20px; }
    .safe-play-wrapper .slider-track-container { padding-top: 40px; }
    .safe-play-wrapper .cap-limit-label { font-size: 12px; padding: 5px 12px; }
    .safe-play-wrapper .pause-duration-labels { overflow-x: hidden; }
    .safe-play-wrapper .pause-segment span { font-size: 10px; }
    .safe-play-wrapper .pause-options-checkboxes { flex-direction: column; gap: 15px; }
    .safe-play-wrapper .lock-button { width: 100%; min-width: auto; padding: 11px 20px; }
    .safe-play-wrapper .sp-btn { width: 100%; }
    .safe-play-wrapper .form-actions { justify-content: stretch; }
    .safe-play-wrapper #cap-edit-actions.visible { flex-direction: column; }
    .safe-play-wrapper .locked-message { width: 100%; text-align: center; }
}

@media (max-width: 480px) {
    .safe-play-wrapper .safe-play-section { padding: 16px; }
    .safe-play-wrapper .safe-play-section h3 { font-size: 18px; }
    .safe-play-wrapper .section-description { font-size: 13px; }
    .safe-play-wrapper .pause-segment span { width: 20px; }
}