/* ============================================================
   Customer Profile Page
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }

.customer-profile-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}

.customer-profile-header h2 {
    font-size: 2.6rem;
    margin-bottom: 0.6rem;
}

.customer-profile-subtitle {
    color: #64748b;
    margin-bottom: 3rem;
}

/* Card */
.customer-profile-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 1.6rem;
    padding: 3rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Grid layout for inputs */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(0px, 100%), 1fr));
    gap: 1.6rem;
    margin-bottom: 2rem;
    min-width: 0;
    width: 100%;
}

/* Force grid children to respect cell boundaries */
.profile-grid > div,
.profile-grid > label,
.profile-grid .input {
    min-width: 0;
    width: 100%;
}

.profile-grid input,
.profile-grid select,
.profile-grid textarea {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

/* Section headings inside form */
.profile-section-heading {
    font-size: 1.8rem;
    margin: 2.5rem 0 1.2rem;
    color: #0f172a;
}

/* Buttons */
.profile-actions {
    margin-top: 3rem;
    display: flex;
    gap: 1.6rem;
    flex-wrap: wrap;
}

.btn-outline {
    appearance: none;
    -webkit-appearance: none;

    border: none !important;
    border-radius: 1rem !important;

    padding: 1rem 2.6rem !important;
    font-size: 1.6rem;
    font-weight: 600;
    line-height: 1.4;

    height: auto;
    text-transform: none;
}

.btn-outline:hover {
    background: #f8fafc;
}


.btn-save {
    appearance: none;
    -webkit-appearance: none;

    background-color: #2563eb !important;
    color: #ffffff !important;

    border: none !important;
    border-radius: 1rem !important;

    padding: 1rem 2.6rem !important;
    font-size: 1.4rem;
    font-weight: 600;
    line-height: 1.4;

    height: auto;
    text-transform: none;
}

.btn-save:hover {
    background-color: #1d4ed8 !important;
}

main {
    background: #dbeafe;
    min-height: 100vh;
    padding-top: 4rem;
    padding-bottom: 4rem;
    overflow-x: hidden;
}

.customer-profile-page {
    overflow-x: hidden;
    width: 100%;
}

.customer-profile-container {
    width: 100%;
}

/* ---- Mobile adjustments ---- */
@media (max-width: 520px) {
    html, body {
        overflow-x: hidden;
        max-width: 100vw;
    }
    .customer-profile-container {
        padding: 0 0.8rem;
        max-width: 100%;
        overflow-x: hidden;
    }
    .customer-profile-card {
        padding: 2rem 1.2rem;
        max-width: 100%;
        overflow: hidden;
    }
    /* Replace grid with simple stacked blocks */
    .profile-grid {
        display: block;
        width: 100%;
        max-width: 100%;
    }
    .profile-grid > * {
        display: block;
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1.6rem;
    }
    /* Clamp every form element inside the card */
    .customer-profile-card input,
    .customer-profile-card textarea,
    .customer-profile-card select {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }
    .cf-turnstile {
        overflow: hidden;
        max-width: 100%;
        transform-origin: left top;
        transform: scale(0.88);
        margin-bottom: -1rem;
    }
    .cf-turnstile iframe {
        max-width: 100% !important;
    }
    .profile-actions {
        flex-direction: column;
    }
    .profile-actions .btn-save,
    .profile-actions .btn-outline {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}

