/* Hide WordPress page title on plugin pages */
.page .entry-title {
    display: none !important;
}

/* Remove any extra spacing */
.site-main {
    padding: 0 !important;
    margin: 0 !important;
}

.bidpounce-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* The operator dashboard main card must not change width when the
   active tab's content changes. Pin it to the full available width
   up to a stable maximum, on desktop only. Mobile keeps its existing
   fluid behavior. */
@media (min-width: 769px) {
    #dashboard-main-content {
        width: 1200px;
        max-width: 1200px;
        min-width: 1200px;
        box-sizing: border-box;
        margin: 0 auto;
    }

    /* Align the plugin container to the top on desktop. The container
       is a 100vh flex box with align-items: center, which centers the
       card vertically and makes the gap above it change with the
       active tab's content height. Top-aligning gives a constant gap
       (the container's own 20px padding) on every tab, on every
       BidPounce page. */
    .bidpounce-container {
        align-items: flex-start;
    }

    /* Customer dashboard card: small constant top gap. Targets the
       card by id so it does not need to fight the template's inline
       ".bidpounce-container { padding-top: 0 !important; }" rule,
       and does not affect the operator dashboard card. */
    #customer-dashboard-main {
        margin-top: 16px;
    }
}

@media (max-width: 768px) {
    .bidpounce-container {
        min-height: auto;
        align-items: flex-start;
        padding: 12px 12px 24px 12px;
    }
}

/* Hide theme footer on all BidPounce pages */
body.page-id-customer-register footer,
body.page-id-customer-login footer,
body.page-id-operator-register footer,
body.page-id-operator-login footer,
body.page-id-customer-dashboard footer,
body.page-id-operator-dashboard footer,
body.page-id-verify-email footer,
body.page-id-reset-password footer {
    display: none !important;
}

/* ===== HEADER STYLING - MATCHING VENDOR PAGE ===== */

/* Header container */
.bidpounce-header {
    background: white !important;
    border-bottom: 1px solid #e2e8f0 !important;
    padding: 15px 30px !important;
}

/* Logo - exactly as Vendor page */
.bidpounce-header .logo a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #1e3a8a !important; /* Darker blue like Vendor page */
    text-decoration: none !important;
    letter-spacing: -0.3px !important;
}

/* Navigation container */
.bidpounce-header .nav-links {
    display: flex !important;
    flex-direction: row !important;
    gap: 25px !important;
}

/* All nav links - base style */
.bidpounce-header .nav-links a {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
    padding: 0 !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Active link - bright blue */
.bidpounce-header .nav-links a.active {
    color: #2563eb !important;
    font-weight: 600 !important;
}

/* Hover state */
.bidpounce-header .nav-links a:hover {
    color: #2563eb !important;
}
/* ===== SLEEKER DASHBOARD STYLES ===== */

/* Remove rounded corners for a sleeker look */
.bidpounce-container .bidpounce-card,
.bidpounce-container > div > div > div {
    border-radius: 8px !important;
}

/* Flatten buttons - less bubbly */
.bidpounce-button,
.bidpounce-container a[style*="background"],
.bidpounce-container button {
    border-radius: 6px !important;
    transition: all 0.2s ease !important;
}

/* Tab styling - clean and professional */
.dashboard-tab {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: all 0.2s ease;
}

.dashboard-tab:hover {
    color: #2563eb !important;
    background: #f8fafc;
}

/* Tab content containers */
.dashboard-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Remove excess shadows for cleaner look */
.bidpounce-container > div > div {
    box-shadow: 0 1px 3px rgba(0,0,0,0.05) !important;
}

/* Sleeker stat cards */
.bidpounce-container [style*="background: #f8fafc"] {
    border-radius: 8px !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.bidpounce-container [style*="background: #f8fafc"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* Clean request cards */
.bidpounce-container [style*="background: #f8fafc"] {
    border: 1px solid #e2e8f0 !important;
}

/* Status badges - sharper */
.bidpounce-container [style*="background:"][style*="20"] {
    border-radius: 4px !important;
    font-weight: 500 !important;
}

/* Hide WordPress title on all pages */
.page .entry-title,
.single .entry-title {
    display: none !important;
}

/* Remove default WordPress spacing */
.site-content,
.site-main {
    padding: 0 !important;
    margin: 0 !important;
}
@keyframes highlightPulse {
    0% {
        background-color: #f0fdf4;
        transform: scale(1);
    }
    50% {
        background-color: #bbf7d0;
        transform: scale(1.02);
    }
    100% {
        background-color: #f0fdf4;
        transform: scale(1);
    }
}

.offer-card {
    transition: all 0.2s ease;
}
/* ============================================
   PASSWORD EYE TOGGLE
   ============================================ */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 45px;
    box-sizing: border-box;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #94a3b8;
    padding: 4px 8px;
    transition: color 0.2s ease;
    z-index: 2;
    line-height: 1;
}

.password-toggle:hover {
    color: #475569;
}

.password-toggle:focus {
    outline: none;
}

/* Mobile friendly - larger touch target */
@media (max-width: 768px) {
    .password-toggle {
        padding: 8px 12px;
        font-size: 20px;
    }
    
    .password-wrapper input[type="password"],
    .password-wrapper input[type="text"] {
        padding-right: 50px;
    }
}

/* ============================================
   BIDPOUNCE — OPERATOR PROFILE MOBILE LAYOUT
   Moved out of templates/operator/profile.php so
   that JS style mutations can't break mobile layout.
   ============================================ */

.profile-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-section-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
}

.profile-section-content {
    padding: 16px;
    overflow-x: hidden;
}

.option-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.option-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.option-card-content {
    padding: 12px 16px;
}

.notification-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.notification-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.notification-card-content {
    padding: 16px;
}

.method-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

#password-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.7) !important;
    z-index: 99999 !important;
    display: none;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

#password-modal > div {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.input-readonly-state {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

@media (max-width: 768px) {
    .profile-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
    }

    .profile-checkbox-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 8px !important;
    }

    .profile-section-content button {
        width: 100%;
        margin-bottom: 8px;
    }

    .helicopter-item {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .helicopter-item select,
    .helicopter-item input,
    .helicopter-item button {
        width: 100% !important;
        margin: 4px 0 !important;
    }

    .template-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ============================================
   PROFILE PAGE — MOBILE LAYOUT (guaranteed)
   These rules live in main.css (loaded in <head>)
   and match on real classes, so no JS anywhere on
   the page can break them.
   ============================================ */

.profile-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.profile-section-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
}

.profile-section-content {
    padding: 16px;
    overflow-x: hidden;
}

.option-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
}

.option-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.option-card-content {
    padding: 12px 16px;
}

.notification-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.notification-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.notification-card-content {
    padding: 16px;
}

.method-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

#password-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0,0,0,0.7) !important;
    z-index: 99999 !important;
    display: none;
    justify-content: center;
    align-items: center;
    margin: 0 !important;
    padding: 0 !important;
}

#password-modal > div {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    margin: 20px;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}

.input-readonly-state {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

/* ============================================
   MOBILE — guarantees no horizontal overflow
   ============================================ */
@media (max-width: 768px) {

    /* Every container inside the profile page must never
       be wider than its parent. */
    .bidpounce-container,
    .bidpounce-container > div,
    .profile-section,
    .profile-section-content,
    .notification-card,
    .notification-card-content,
    .option-card,
    .option-card-content {
        max-width: 100% !important;
        overflow-x: hidden !important;
        box-sizing: border-box !important;
    }

    /* Text inputs must never force their parent wider than the viewport.
       Checkbox/radio are excluded — they're small by design and forcing
       max-width on them serves no purpose. */
    .bidpounce-container input[type="text"],
    .bidpounce-container input[type="tel"],
    .bidpounce-container input[type="email"],
    .bidpounce-container input[type="url"],
    .bidpounce-container input[type="search"],
    .bidpounce-container input[type="number"],
    .bidpounce-container input[type="password"],
    .bidpounce-container input[type="date"],
    .bidpounce-container input[type="time"],
    .bidpounce-container select,
    .bidpounce-container textarea {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* The SMS/WhatsApp phone rows stack on mobile. */
    .phone-input-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        flex-wrap: wrap !important;
        width: 100% !important;
    }

    .phone-input-row > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        box-sizing: border-box !important;
    }

    /* The profile-checkbox-row stays inline on mobile. Only direct
       children that are NOT checkbox/radio get stretched. */
    .profile-checkbox-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .profile-checkbox-row > input[type="checkbox"],
    .profile-checkbox-row > input[type="radio"] {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }

    /* Kill any min-width on the phone inputs specifically. */
    #sms_phone_input,
    #whatsapp_phone_input,
    #sms_country_code,
    #whatsapp_country_code {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        flex: 1 1 auto !important;
        box-sizing: border-box !important;
    }

    /* Grids become stacks. */
    .profile-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }

    /* Buttons go full width. */
    .profile-section-content button {
        width: 100% !important;
        margin-bottom: 8px !important;
    }

    /* Helicopter fleet rows stack. */
    .helicopter-item {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .helicopter-item select,
    .helicopter-item input,
    .helicopter-item button {
        width: 100% !important;
        margin: 4px 0 !important;
    }

    /* Template rows stack. */
    .template-item {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ============================================
   GLOBAL MOBILE SAFETY NET
   Guarantees no horizontal overflow on mobile,
   regardless of what any JS does to inline styles
   or DOM structure on any plugin page.
   ============================================ */

@media (max-width: 768px) {
    /* Every element inside the plugin container
       must be at most as wide as its parent. */
    .bidpounce-container,
    .bidpounce-container * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* The document itself must never scroll sideways. */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Direct children of containers must wrap, not push. */
    .bidpounce-container > div,
    .bidpounce-container > form,
    .bidpounce-container form > div {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Phone and checkbox rows may wrap on mobile. Do NOT force wrap on
       every inline-styled flex label — a label with a checkbox plus a
       text block will wrap the text onto a new line and orphan the
       checkbox. That's the bug this replaces. */
    .bidpounce-container .profile-checkbox-row,
    .bidpounce-container .phone-input-row {
        flex-wrap: wrap !important;
        min-width: 0 !important;
    }

    /* Any fixed-width text inputs become fluid.
       NOTE: this deliberately excludes checkbox, radio, and submit
       inputs — applying `width: 100%` to those pushes them onto their
       own line, breaking inline label+input layouts everywhere. */
    .bidpounce-container input[type="text"],
    .bidpounce-container input[type="tel"],
    .bidpounce-container input[type="email"],
    .bidpounce-container input[type="url"],
    .bidpounce-container input[type="search"],
    .bidpounce-container input[type="number"],
    .bidpounce-container input[type="password"],
    .bidpounce-container input[type="date"],
    .bidpounce-container input[type="time"],
    .bidpounce-container select,
    .bidpounce-container textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    /* Grids collapse. */
    .bidpounce-container [style*="display: grid"],
    .bidpounce-container .profile-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 12px !important;
        width: 100% !important;
    }
    
    /* A label containing a checkbox/radio plus a text block must keep
       them on the same line on mobile. The checkbox stays its natural
       size; the text block shrinks and wraps its own content. */
    .bidpounce-container label {
        flex-wrap: nowrap !important;
        align-items: flex-start !important;
    }

    .bidpounce-container label > input[type="checkbox"],
    .bidpounce-container label > input[type="radio"] {
        flex: 0 0 auto !important;
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        margin-top: 3px !important;
    }

    .bidpounce-container label > div,
    .bidpounce-container label > span:not([class]) {
        flex: 1 1 auto !important;
        min-width: 0 !important;
        max-width: 100% !important;
    }
}

/* ============================================
   PROFILE PAGE — MOBILE: kill left-shift on phone rows
   Fixes: content pushed off left edge (unreachable),
   white space on right (reachable). Cause: margin-left
   on inner wrappers plus non-wrapping flex children.
   ============================================ */
@media (max-width: 768px) {

    /* 1. Remove the margin-left: 28px offset on inner wrappers.
          That offset is what pushes content past the left edge
          once the row overflows. */
    .notification-card-content > div[style*="margin-left"],
    .notification-card-content > div > div[style*="margin-left"] {
        margin-left: 0 !important;
    }

    /* 2. Force the phone rows to stack vertically and be fluid.
          Both the SMS row and the WhatsApp row. */
    #sms_country_code,
    #sms_phone_input,
    #verify-sms-btn,
    #confirm-sms-btn,
    #change-sms-btn,
    #sms_code,
    #sms-timer {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
    }

    #whatsapp_country_code,
    #whatsapp_phone_input,
    #verify-whatsapp-btn,
    #confirm-whatsapp-btn,
    #change-whatsapp-btn,
    #whatsapp_code,
    #whatsapp-timer {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 100% !important;
        box-sizing: border-box !important;
        margin-left: 0 !important;
    }

    /* 3. The containers holding those rows must stack. */
    #sms-verification-section,
    #whatsapp-verification-section,
    #sms-consent-container,
    #whatsapp-consent-container {
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        overflow-x: hidden !important;
    }

    /* 4. Any direct child of the phone row stacks full width. */
    #sms-verification-section > div,
    #whatsapp-verification-section > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 5. The phone row stacks. The profile-checkbox-row does NOT —
       it should keep checkbox and label on the same line. */
    .phone-input-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
    }

    .phone-input-row > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        box-sizing: border-box !important;
    }

    /* Profile-checkbox-row: keep the row inline. Checkbox and label
       stay side by side. */
    .profile-checkbox-row {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 8px !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .profile-checkbox-row > input[type="checkbox"],
    .profile-checkbox-row > input[type="radio"] {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
    }
}

/* ============================================
   FINAL FIX — SMS verification section
   Applies unconditionally (no media query) so it
   always wins, and uses maximum specificity.
   ============================================ */

#sms-verification-section {
    margin-left: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
}

#sms-verification-section > div {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

#sms-verification-section input,
#sms-verification-section button,
#sms-verification-section span {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    flex: 1 1 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

/* ============================================
   Profile message + verification section visibility
   Uses classes, not .show()/.hide(), so jQuery's
   computed-display dance can't break the layout.
   ============================================ */

#profile-message {
    display: none;
}

#profile-message.profile-message-visible {
    display: block !important;
}

#profile-message.profile-message-success {
    background: #d1fae5;
    color: #065f46;
}

#profile-message.profile-message-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Visibility toggles for the phone-verification sections.
   The template markup carries inline style="display: none;" on
   #sms-verification-section and #whatsapp-verification-section,
   and inline styles beat any non-!important stylesheet rule.
   The !important here is what makes the .addClass() toggle work. */
#sms-verification-section {
    display: none;
}

#sms-verification-section.sms-verification-visible {
    display: block !important;
}

#whatsapp-verification-section {
    display: none;
}

#whatsapp-verification-section.whatsapp-verification-visible {
    display: block !important;
}

/* ============================================
   CUSTOMER PROFILE — MOBILE LAYOUT
   Moved from the template's inline <style> block.
   Uses stable classes and IDs so jQuery .show()/.hide()/.css()
   cannot break the mobile cascade.
   ============================================ */

.profile-two-column {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.notification-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.notification-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.notification-card-content {
    padding: 16px;
}

.method-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.consent-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.consent-checkbox {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
    cursor: pointer;
}

.consent-checkbox.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.consent-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.consent-warning {
    background: #fef3c7;
    padding: 12px 16px;
    border-radius: 12px;
    margin: 12px 0;
    border-left: 4px solid #f59e0b;
    font-size: 13px;
    color: #92400e;
}

.input-readonly-state {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

#profile-message {
    display: none;
}

#profile-message.profile-message-visible {
    display: block;
}

#profile-message.profile-message-success {
    background: #d1fae5;
    color: #065f46;
}

#profile-message.profile-message-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Phone-verification section visibility for the customer profile
   is handled via the .cp-verification-section / .cp-verification-visible
   classes, defined earlier under "CUSTOMER PROFILE PAGE". The
   operator-profile ID selectors live in the "Profile message +
   verification section visibility" block above and apply there. */
   

@media (max-width: 768px) {
    .profile-two-column {
        display: flex !important;
        flex-direction: column !important;
        gap: 32px !important;
    }

    .notification-card-content {
        padding: 12px;
    }

    .phone-input-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .phone-input-row select,
    .phone-input-row input,
    .phone-input-row button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 4px 0 !important;
        box-sizing: border-box !important;
    }

    #whatsapp-verification-section > div,
    #sms-verification-section > div {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    #whatsapp-verification-section input,
    #sms-verification-section input,
    #whatsapp-verification-section button,
    #sms-verification-section button,
    #whatsapp-verification-section span,
    #sms-verification-section span {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .profile-save-buttons {
        flex-direction: column;
    }

    .profile-save-buttons button {
        width: 100%;
        margin-bottom: 8px;
    }

    .bidpounce-container input[type="text"],
    .bidpounce-container input[type="tel"],
    .bidpounce-container input[type="email"],
    .bidpounce-container input[type="url"],
    .bidpounce-container input[type="search"],
    .bidpounce-container input[type="number"],
    .bidpounce-container input[type="password"],
    .bidpounce-container input[type="date"],
    .bidpounce-container input[type="time"],
    .bidpounce-container select,
    .bidpounce-container textarea {
        box-sizing: border-box;
        max-width: 100%;
    }
}

/* ============================================
   CUSTOMER PROFILE PAGE
   All styles for templates/customer/profile.php.
   The template has no inline <style> block.
   ============================================ */

/* Outer card */
.cp-profile-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    width: 100%;
    max-width: 900px;
}

/* Header */
.cp-profile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.cp-profile-header h1 {
    font-size: 24px;
    color: #1e293b;
    margin: 0;
}

.cp-back-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
}

.cp-back-link:hover {
    color: #2563eb;
}

/* Sections */
.cp-section {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
}

.cp-section-header {
    background: #f8fafc;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    font-weight: 600;
    color: #1e293b;
    font-size: 15px;
}

.cp-section-content {
    padding: 16px;
}

/* Fields */
.cp-field {
    margin-bottom: 16px;
}

.cp-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: #1e293b;
    font-size: 14px;
}

.cp-field input[type="text"],
.cp-field input[type="email"],
.cp-field input[type="tel"],
.cp-field input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}

.cp-field input.cp-input-readonly {
    background: #f1f5f9;
    color: #64748b;
}

.cp-field small {
    display: block;
    color: #64748b;
    font-size: 12px;
    margin-top: 4px;
}

/* Buttons */
.cp-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-align: center;
    transition: opacity 0.15s ease;
}

.cp-btn:hover {
    opacity: 0.9;
}

.cp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.cp-btn-primary {
    background: #2563eb;
    color: white;
}

.cp-btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.cp-btn-success {
    background: #059669;
    color: white;
}

.cp-btn-warning {
    background: #f59e0b;
    color: white;
}

.cp-btn-danger {
    background: #dc2626;
    color: white;
}

.cp-btn-whatsapp {
    background: #25D366;
    color: white;
}

.cp-actions {
    margin-top: 20px;
}

/* Tip box */
.cp-tip {
    background: #f0fdf4;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #059669;
    font-size: 13px;
    color: #065f46;
}

.cp-tip-light {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    border-left: 4px solid #cbd5e1;
    font-size: 13px;
    color: #64748b;
}

.cp-warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400e;
}

.cp-warning-box p {
    margin: 6px 0 0 0;
    font-size: 13px;
}

.cp-success-box {
    background: #d1fae5;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.cp-success-box strong {
    color: #065f46;
}

.cp-success-box p {
    margin: 2px 0 0 0;
    font-size: 13px;
    color: #047857;
}

.cp-id-notice {
    background: #fef9e3;
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid #f59e0b;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 13px;
    color: #92400e;
}

.cp-id-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.cp-payment-note {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Notification cards */
.notification-card {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
    background: white;
}

.notification-card.selected {
    border: 2px solid #059669;
    background: #f0fdf4;
}

.notification-card-content {
    padding: 16px;
}

.cp-card-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex-wrap: wrap;
}

.cp-card-title {
    font-size: 16px;
    font-weight: 500;
}

.cp-card-subtitle {
    font-size: 12px;
    color: #64748b;
}

.cp-card-body {
    margin-top: 12px;
}

.cp-us-only {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border-radius: 6px;
    border-left: 3px solid #059669;
    font-size: 12px;
    color: #065f46;
}

/* Phone input row */
.phone-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.phone-input-row select {
    width: 100px;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    flex-shrink: 0;
}

.phone-input-row input[type="tel"] {
    flex: 1;
    min-width: 140px;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.phone-input-row button {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 12px;
}

.input-readonly-state {
    background: #e2e8f0 !important;
    color: #64748b !important;
}

/* Info box for WhatsApp instructions */
.cp-info-box {
    margin-top: 10px;
    padding: 12px;
    background: #f0fdf4;
    border-radius: 8px;
    border: 1px solid #bbf7d0;
}

.cp-info-box p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: #065f46;
}

.cp-info-box p:last-child {
    margin-bottom: 0;
}

/* Consent checkbox */
.cp-consent {
    margin-top: 10px;
}

.cp-consent label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 12px;
    color: #334155;
}

/* Verification section (code entry) */
.cp-verification-section {
    display: none;
    margin-top: 10px;
    padding: 10px;
    background: #fef9e3;
    border-radius: 6px;
    gap: 8px;
    flex-direction: column;
}

.cp-verification-section.cp-verification-visible {
    display: flex;
}

.cp-verification-section input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-sizing: border-box;
}

.cp-timer {
    font-size: 11px;
    color: #92400e;
}

/* Method hint */
.method-hint {
    margin-top: 16px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    padding: 8px;
    background: #f8fafc;
    border-radius: 8px;
}

.cp-verified-note {
    margin-top: 8px;
    padding: 6px;
    background: #d1fae5;
    border-radius: 6px;
    color: #065f46;
}

/* Profile message */
#profile-message {
    display: none;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
}

#profile-message.cp-message-visible {
    display: block;
}

#profile-message.cp-message-success {
    background: #d1fae5;
    color: #065f46;
}

#profile-message.cp-message-error {
    background: #fee2e2;
    color: #dc2626;
}

/* Save buttons */
.profile-save-buttons {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* Card element */
#profile-card-element {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 12px;
    background: white;
    min-height: 40px;
}

.cp-error-text {
    color: #dc2626;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.cp-error-text:not(:empty) {
    display: block;
}

.cp-success-text {
    color: #059669;
    font-size: 13px;
    margin-top: 8px;
}

/* Modals */
#password-modal,
#change-number-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
}

#password-modal.cp-modal-visible,
#change-number-modal.cp-modal-visible {
    display: flex;
}

#password-modal > div,
.cp-modal-box {
    background: white;
    border-radius: 16px;
    padding: 24px;
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-sizing: border-box;
}

#password-modal h3,
.cp-modal-box h3 {
    margin: 0 0 20px 0;
    font-size: 20px;
    color: #1e293b;
}

.cp-modal-box {
    text-align: center;
}

.cp-modal-emoji {
    font-size: 48px;
    margin-bottom: 12px;
}

.cp-modal-box p {
    color: #64748b;
    font-size: 14px;
    margin-bottom: 20px;
}

.cp-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Utility */
.cp-hidden {
    display: none !important;
}

/* ============================================
   MOBILE — MAX-WIDTH 768px
   ============================================ */
@media (max-width: 768px) {

    /* Prevent horizontal scroll */
    html,
    body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
    }

    /* Card padding tighter on mobile */
    .cp-profile-card {
        padding: 16px;
        border-radius: 12px;
    }

    /* Header stacks */
    .cp-profile-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .cp-profile-header h1 {
        font-size: 20px;
    }

    /* Section content tighter */
    .cp-section-content {
        padding: 12px;
    }

    .cp-section-header {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Everything inside the card can't exceed its parent */
    .cp-profile-card,
    .cp-profile-card * {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    /* Inputs go full width */
    .cp-field input[type="text"],
    .cp-field input[type="email"],
    .cp-field input[type="tel"],
    .cp-field input[type="password"] {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Phone input rows stack */
    .phone-input-row {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .phone-input-row select,
    .phone-input-row input[type="tel"],
    .phone-input-row button {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        flex: 1 1 auto !important;
        box-sizing: border-box !important;
    }

    /* Buttons in cards go full width */
    .cp-section-content > .cp-actions .cp-btn,
    .cp-section-content .cp-btn {
        width: 100% !important;
    }

    /* But keep inline phone-row buttons full width instead of overflowing */
    .phone-input-row button {
        width: 100% !important;
    }

    /* Verification section stacks fully */
    .cp-verification-section {
        width: 100% !important;
    }

    /* Save buttons stack */
    .profile-save-buttons {
        flex-direction: column !important;
    }

    .profile-save-buttons .cp-btn {
        width: 100% !important;
    }

    /* Modal buttons stack */
    .cp-modal-actions {
        flex-direction: column-reverse !important;
    }

    .cp-modal-actions .cp-btn {
        width: 100% !important;
    }

    /* Success box wraps */
    .cp-success-box {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .cp-success-box .cp-btn {
        width: 100% !important;
    }

    /* ID notice tightens */
    .cp-id-notice {
        padding: 10px 12px;
    }
}
/* ============================================
   CUSTOMER PROFILE — container flex fix
   The .bidpounce-container is a flex container.
   .cp-profile-card is its only flex item, and
   without min-width:0 it refuses to shrink below
   its content's intrinsic minimum width on mobile,
   which overflows the viewport.
   ============================================ */

.bidpounce-container-profile {
    min-width: 0;
}

.bidpounce-container-profile .cp-profile-card {
    min-width: 0;
    flex: 0 1 auto;
}

@media (max-width: 768px) {
    .bidpounce-container-profile {
        display: block !important;
        align-items: initial !important;
        justify-content: initial !important;
        padding: 12px !important;
        min-height: auto !important;
    }

    .bidpounce-container-profile .cp-profile-card {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
    }
}

/* ============================================
   CUSTOMER PROFILE — inline radio buttons
   The radio inputs were being centered and pushed
   above their labels because the flex label had
   align-items: center but the input was treated as
   a block-level flex item that wrapped. Force them
   to sit inline with their text.
   ============================================ */

.cp-card-label {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-wrap: nowrap !important;
}

.cp-card-label input[type="radio"] {
    flex: 0 0 auto !important;
    width: auto !important;
    height: auto !important;
    margin: 0 !important;
    display: inline-block !important;
    align-self: center !important;
}

/* ============================================
   Checkbox and radio inputs must stay inline-sized.
   Applies at all viewport widths so no rule anywhere
   can widen them. Wrapped in @media to match the
   pattern the safety-net rules use; the properties
   themselves apply at every width.
   ============================================ */
@media (max-width: 768px) {
    .bidpounce-container input[type="checkbox"],
    .bidpounce-container input[type="radio"] {
        width: auto !important;
        max-width: none !important;
        min-width: 0 !important;
        flex: 0 0 auto !important;
        display: inline-block !important;
    }
}