/* Modern international phone field — shopping signup */

.signup-phone-input-wrapper.signup-email-input-wrap:has(.signup-phone-field) {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    gap: 0;
}

.signup-phone-input-wrapper.signup-email-input-wrap:has(.signup-phone-field):focus-within {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.signup-phone-intl {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: stretch;
}

.signup-phone-field {
    display: flex;
    flex: 1;
    min-width: 0;
    align-items: stretch;
    gap: 0;
    background: linear-gradient(145deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.88) 100%);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        0 4px 20px rgba(0, 0, 0, 0.18);
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        transform 0.22s ease;
}

.signup-phone-input-wrapper:focus-within .signup-phone-field,
.signup-phone-field:focus-within {
    border-color: rgba(96, 165, 250, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 0 0 3px rgba(59, 130, 246, 0.2),
        0 8px 28px rgba(37, 99, 235, 0.15);
}

/* Dial picker trigger */
.dial-picker {
    position: relative;
    flex-shrink: 0;
}

.dial-picker__trigger {
    display: flex;
    align-items: center;
    gap: 9px;
    height: 100%;
    min-height: 50px;
    padding: 0 14px 0 12px;
    border: none;
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    background: linear-gradient(180deg, rgba(51, 65, 85, 0.95) 0%, rgba(30, 41, 59, 0.98) 100%);
    color: #f8fafc;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}

.dial-picker__trigger:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(71, 85, 105, 0.98) 0%, rgba(51, 65, 85, 1) 100%);
}

.dial-picker__trigger:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.dial-picker__trigger.is-open {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.35) 0%, rgba(37, 99, 235, 0.28) 100%);
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.35);
}

.dial-picker__flag-wrap {
    width: 30px;
    height: 21px;
    border-radius: 5px;
    overflow: hidden;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.35);
    background: #1e293b;
}

.dial-picker__flag {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dial-picker__code {
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.dial-picker__chevron {
    font-size: 0.62rem;
    opacity: 0.75;
    transition: transform 0.22s ease;
    margin-left: 1px;
}

.dial-picker__trigger.is-open .dial-picker__chevron {
    transform: rotate(180deg);
}

/* National number input */
.signup-phone-national {
    flex: 1;
    min-width: 0;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    padding: 14px 16px !important;
    font-size: 1rem !important;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: #f8fafc !important;
    box-shadow: none !important;
}

.signup-phone-national::placeholder {
    color: rgba(148, 163, 184, 0.5);
    font-weight: 400;
    letter-spacing: 0.02em;
}

.signup-phone-national:focus {
    outline: none;
}

.signup-phone-national[readonly] {
    opacity: 0.85;
    cursor: default;
}

/* Floating panel (portaled to body) */
.dial-picker__panel[hidden] {
    display: none !important;
}

.dial-picker__panel:not([hidden]) {
    display: flex;
    flex-direction: column;
    position: fixed;
    z-index: 10060;
    min-width: 300px;
    max-width: min(360px, calc(100vw - 20px));
    max-height: min(340px, 52vh);
    background: linear-gradient(168deg, #334155 0%, #1e293b 42%, #0f172a 100%);
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 16px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow:
        0 0 0 1px rgba(96, 165, 250, 0.1),
        0 28px 56px rgba(0, 0, 0, 0.55),
        0 12px 24px rgba(15, 23, 42, 0.4);
    overflow: hidden;
    animation: dialPickerIn 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes dialPickerIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.dial-picker__search-wrap {
    position: relative;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.65);
}

.dial-picker__search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 0.85rem;
    pointer-events: none;
}

.dial-picker__search {
    width: 100%;
    padding: 14px 16px 14px 44px;
    border: none;
    background: transparent;
    color: #f8fafc;
    font-size: 0.92rem;
    font-family: inherit;
}

.dial-picker__search:focus {
    outline: none;
}

.dial-picker__search::placeholder {
    color: #64748b;
}

.dial-picker__list {
    list-style: none;
    margin: 0;
    padding: 8px;
    overflow-y: auto;
    flex: 1 1 auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.dial-picker__list::-webkit-scrollbar {
    width: 6px;
}

.dial-picker__list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.35);
    border-radius: 99px;
}

.dial-picker__item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 12px;
    border: none;
    border-radius: 11px;
    background: transparent;
    color: #e2e8f0;
    font-family: inherit;
    font-size: 0.9rem;
    text-align: left;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.12s ease;
}

.dial-picker__item:hover,
.dial-picker__item.is-highlighted {
    background: rgba(59, 130, 246, 0.22);
}

.dial-picker__item.is-selected {
    background: rgba(59, 130, 246, 0.38);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.25);
}

.dial-picker__item-flag {
    width: 34px;
    height: 24px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.1),
        0 2px 4px rgba(0, 0, 0, 0.3);
}

.dial-picker__item-body {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.dial-picker__item-name {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dial-picker__item-dial {
    font-size: 0.82rem;
    color: #94a3b8;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.dial-picker__empty {
    padding: 24px 16px;
    text-align: center;
    color: #94a3b8;
    font-size: 0.86rem;
}

/* Verify row — phone + SMS button */
.signup-phone-row--verify .signup-email-row {
    align-items: stretch;
    gap: 10px;
}

.signup-phone-row--verify .signup-email-verify-btn {
    align-self: stretch;
    min-height: 50px;
    border-radius: 14px;
}

.signup-phone-field-icon {
    display: none;
}

/* Fit inside auth modal — no horizontal overflow */
.auth-card .signup-phone-field {
    max-width: 100%;
}

.auth-card .dial-picker__trigger {
    padding: 0 10px 0 8px;
    gap: 6px;
    min-height: 46px;
}

.auth-card .signup-phone-national {
    padding: 12px 10px !important;
    font-size: 0.92rem !important;
    letter-spacing: 0.02em;
}

.auth-card.wide .dial-picker__trigger {
    padding: 0 12px 0 10px;
    gap: 8px;
    min-height: 48px;
}

.auth-card.wide .signup-phone-national {
    padding: 13px 14px !important;
    font-size: 0.95rem !important;
}
