/**
 * Profile page — full-width responsive cards, glow, and field styling.
 */

:root {
    --profile-field-blue: #7dd3fc;
    --profile-field-blue-bright: #bae6fd;
    --profile-field-blue-border: rgba(125, 211, 252, 0.45);
    --profile-field-blue-glow: rgba(125, 211, 252, 0.22);
    --profile-field-blue-glow-strong: rgba(125, 211, 252, 0.35);
    --profile-field-blue-bg-hover: rgba(125, 211, 252, 0.1);
}

.profile-page {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: none;
    grid-template-columns: 1fr;
}

.lc-card {
    background: var(--surface, #0f172a);
    border: 1px solid var(--border, #1e293b);
    border-radius: var(--radius, 12px);
    padding: 1.5rem;
    box-shadow: var(--shadow, 0 12px 32px rgba(0, 0, 0, 0.45));
    transition: border-color 0.2s ease, box-shadow 0.25s ease;
    width: 100%;
    min-width: 0;
}

.lc-card:hover,
.lc-card:focus-within {
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow:
        0 0 28px var(--primary-glow, rgba(45, 212, 191, 0.35)),
        var(--shadow, 0 12px 32px rgba(0, 0, 0, 0.45));
}

.lc-card-title {
    margin: 0 0 1.25rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text, #e2e8f0);
}

.profile-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
    width: 100%;
}

.profile-field > span,
.profile-field > label > span,
.profile-page .form-grid label > span:first-child {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted, #94a3b8);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-field-input,
.profile-field-value,
.profile-email-new,
.profile-email-code,
.profile-page .form-grid input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.profile-page .form-grid select,
.profile-page .form-grid textarea,
.profile-email-block input:not([type="hidden"]),
.profile-email-block select,
.profile-email-block textarea,
.lc-phone-field .lc-phone-dial,
.lc-phone-field .lc-phone-national,
.booking-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.booking-form select,
.booking-form textarea,
.booking-wizard input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]),
.booking-wizard select,
.booking-wizard textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem 0.85rem;
    border: 1px solid var(--profile-field-blue-border);
    border-radius: 10px;
    font: inherit;
    font-size: 0.95rem;
    background: transparent !important;
    color: var(--profile-field-blue) !important;
    -webkit-text-fill-color: var(--profile-field-blue);
    box-sizing: border-box;
    transition:
        border-color 0.15s ease,
        box-shadow 0.2s ease,
        background 0.15s ease,
        color 0.15s ease;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-shadow: 0 0 16px var(--profile-field-blue-glow);
}

.profile-field-input::placeholder,
.profile-email-new::placeholder,
.profile-email-code::placeholder,
.profile-page .form-grid input::placeholder,
.profile-page .form-grid textarea::placeholder,
.booking-form input::placeholder,
.booking-form textarea::placeholder,
.booking-wizard input::placeholder,
.booking-wizard textarea::placeholder {
    color: rgba(125, 211, 252, 0.45);
    opacity: 1;
}

.profile-field-input:hover,
.profile-field-value:hover,
.profile-email-new:hover,
.profile-email-code:hover,
.profile-page .form-grid input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover,
.profile-page .form-grid select:hover,
.profile-page .form-grid textarea:hover,
.lc-phone-field .lc-phone-dial:hover,
.lc-phone-field .lc-phone-national:hover,
.booking-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover,
.booking-form select:hover,
.booking-form textarea:hover,
.booking-wizard input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover,
.booking-wizard select:hover,
.booking-wizard textarea:hover {
    background: var(--profile-field-blue-bg-hover) !important;
    border-color: var(--profile-field-blue);
    box-shadow: 0 0 20px var(--profile-field-blue-glow-strong);
    color: var(--profile-field-blue-bright) !important;
    -webkit-text-fill-color: var(--profile-field-blue-bright);
}

.profile-field-input:focus,
.profile-email-new:focus,
.profile-email-code:focus,
.profile-page .form-grid input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.profile-page .form-grid select:focus,
.profile-page .form-grid textarea:focus,
.lc-phone-field .lc-phone-dial:focus,
.lc-phone-field .lc-phone-national:focus,
.booking-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.booking-form select:focus,
.booking-form textarea:focus,
.booking-wizard input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus,
.booking-wizard select:focus,
.booking-wizard textarea:focus {
    outline: none;
    background: var(--profile-field-blue-bg-hover) !important;
    border-color: var(--profile-field-blue);
    box-shadow: 0 0 24px var(--profile-field-blue-glow-strong);
    color: var(--profile-field-blue-bright) !important;
    -webkit-text-fill-color: var(--profile-field-blue-bright);
}

.profile-field-input:-webkit-autofill,
.profile-email-new:-webkit-autofill,
.profile-email-code:-webkit-autofill,
.profile-page .form-grid input:-webkit-autofill,
.lc-phone-field .lc-phone-national:-webkit-autofill,
.booking-form input:-webkit-autofill,
.booking-wizard input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px rgba(7, 11, 20, 0.95) inset !important;
    -webkit-text-fill-color: var(--profile-field-blue) !important;
    caret-color: var(--profile-field-blue);
}

.profile-page .form-grid select,
.profile-email-block select,
.lc-phone-field .lc-phone-dial,
.booking-form select,
.booking-wizard select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: transparent !important;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--profile-field-blue) 50%),
        linear-gradient(135deg, var(--profile-field-blue) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    color-scheme: dark;
    cursor: pointer;
    padding-right: 1.75rem;
}

.profile-page .form-grid select option,
.profile-email-block select option,
.lc-phone-field .lc-phone-dial option,
.booking-form select option,
.booking-wizard select option {
    background: #07111f;
    color: var(--profile-field-blue);
}

.profile-field-value {
    display: block;
    margin: 0;
    cursor: default;
    min-height: calc(0.95rem + 1.4rem + 2px);
    line-height: 1.45;
}

.profile-email-readonly {
    display: none;
}

.profile-email-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: stretch;
    width: 100%;
    min-width: 0;
}

.profile-email-code-wrap[hidden] {
    display: none !important;
}

.profile-email-change-panel[hidden] {
    display: none !important;
}

.profile-email-change-panel:not([hidden]) {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.25rem;
    padding: 1.25rem;
    border: 1px solid rgba(45, 212, 191, 0.35);
    border-radius: var(--radius, 12px);
    background: rgba(7, 11, 20, 0.65);
    box-shadow: inset 0 0 32px rgba(45, 212, 191, 0.05);
}

.profile-email-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.profile-email-msg {
    margin: 0;
    font-size: 0.85rem;
    color: var(--error, #f87171);
}

.profile-email-msg.is-success {
    color: var(--success, #4ade80);
}

.profile-email-code-hint {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
}

.profile-page .btn,
.profile-email-block .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}

.profile-page .btn-primary,
.profile-email-block .btn-primary {
    background: linear-gradient(135deg, var(--primary, #2dd4bf), #14b8a6);
    color: #042f2e !important;
    border-color: transparent;
    box-shadow: 0 0 0 0 var(--primary-glow, rgba(45, 212, 191, 0.35));
}

.profile-page .btn-primary:hover,
.profile-email-block .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 28px var(--primary-glow, rgba(45, 212, 191, 0.35));
    color: #022c22 !important;
}

.profile-page .btn-secondary,
.profile-email-block .btn-secondary {
    background: transparent;
    color: var(--primary, #2dd4bf) !important;
    border-color: rgba(45, 212, 191, 0.45);
}

.profile-page .btn-secondary:hover,
.profile-email-block .btn-secondary:hover {
    background: rgba(45, 212, 191, 0.1);
    border-color: var(--primary, #2dd4bf);
    box-shadow: 0 0 20px rgba(45, 212, 191, 0.2);
    color: #5eead4 !important;
}

.profile-page .btn-sm,
.profile-email-block .btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.82rem;
}

.profile-page .form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 1rem;
    width: 100%;
}

.profile-page .form-grid .full {
    grid-column: 1 / -1;
}

.profile-page .form-actions {
    margin-top: 1.25rem;
    padding-top: 0.25rem;
}

.lc-phone-field {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.lc-phone-field .lc-phone-dial {
    flex: 0 0 4.75rem;
    width: 4.75rem;
    max-width: 4.75rem;
    min-width: 4.75rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
    font-size: 0.9rem;
}

.lc-phone-field .lc-phone-national {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    max-width: 100%;
}

.profile-page .btn-ghost,
.avail-week-nav .btn-ghost {
    background: transparent;
    color: var(--muted, #94a3b8) !important;
    border-color: transparent;
}

.profile-page .btn-ghost:hover,
.avail-week-nav .btn-ghost:hover {
    color: var(--primary, #2dd4bf) !important;
}

@media (max-width: 640px) {
    .lc-phone-field {
        flex-direction: row;
    }

    .lc-phone-field .lc-phone-dial {
        flex: 0 0 4.75rem;
        width: 4.75rem;
        max-width: 4.75rem;
    }
}

.profile-address-search-wrap {
    position: relative;
    width: 100%;
}

.address-suggestions {
    position: absolute;
    z-index: 40;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    background: rgba(7, 11, 20, 0.96);
    border: 1px solid var(--profile-field-blue-border);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 0 24px var(--profile-field-blue-glow-strong);
}

.address-sugg {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.65rem 0.85rem;
    border: 0;
    border-bottom: 1px solid rgba(125, 211, 252, 0.12);
    background: transparent;
    color: var(--profile-field-blue);
    font: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

.address-sugg:last-child {
    border-bottom: 0;
}

.address-sugg:hover {
    background: var(--profile-field-blue-bg-hover);
    color: var(--profile-field-blue-bright);
}

.profile-history-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.profile-history-list li {
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--profile-field-blue-border);
    border-radius: 10px;
    font-size: 0.92rem;
    word-break: break-word;
    color: var(--profile-field-blue);
    background: transparent;
    box-shadow: 0 0 12px var(--profile-field-blue-glow);
}

.profile-page .hint {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: var(--muted, #94a3b8);
}
