/* Shared outlined floating-label fields (contact, account, AI results, checkout). */

.contact-outline-field {
    position: relative;
    margin-bottom: 1rem;
}

.contact-outline-input {
    display: block;
    width: 100%;
    padding: 18px 22px 14px;
    font-size: 14px;
    line-height: 1.4;
    color: var(--text-dark);
    background-color: #fff;
    border: 0.5px solid rgba(142, 143, 144, 0.6);
    border-radius: 5px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-weight: lighter;
}

.contact-outline-input::placeholder {
    color: transparent;
}

.contact-outline-input:focus {
    outline: none;
    border-color: #a08f72;
    box-shadow: 0 0 0 1px rgba(160, 143, 114, 0.25);
}

.contact-outline-textarea {
    min-height: 140px;
    resize: vertical;
    padding-top: 18px;
    resize: none;
}

.contact-outline-label {
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%);
    transform-origin: left center;
    max-width: calc(100% - 28px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 15px;
    font-weight: 100;
    color: var(--text-dark);
    line-height: 1;
    pointer-events: none;
    background-color: #fff;
    padding: 0 6px;
    margin: 0;
    transition:
        top 0.2s ease,
        transform 0.2s ease,
        font-size 0.2s ease,
        color 0.2s ease;
}

.contact-outline-field:focus-within .contact-outline-label,
.contact-outline-input:not(:placeholder-shown) + .contact-outline-label {
    top: 0;
    transform: translateY(-50%) scale(0.86);
    font-size: 14px;
    color: var(--dark-accent-gold);
}

.contact-outline-field--textarea .contact-outline-label {
    top: 20px;
    transform: translateY(0);
}

.contact-outline-field--textarea:focus-within .contact-outline-label,
.contact-outline-field--textarea .contact-outline-input:not(:placeholder-shown) + .contact-outline-label {
    top: 0;
    transform: translateY(-50%) scale(0.86);
}

.contact-outline-field:focus-within .contact-outline-label {
    color: #8b7658;
}

/* Select dropdowns: placeholder option (value=""); label floats when :valid */
.account-select-field .contact-outline-input:invalid + .contact-outline-label,
.account-select-field:focus-within .contact-outline-input:invalid + .contact-outline-label {
    opacity: 0;
    top: 50%;
    transform: translateY(-50%) scale(1);
    font-size: 15px;
    color: var(--text-dark, #111);
}

.account-select-field .contact-outline-input:valid + .contact-outline-label {
    opacity: 1;
    top: 0;
    transform: translateY(-50%) scale(0.86);
    font-size: 14px;
    color: var(--dark-accent-gold, #8f7858);
}

.account-select-field:focus-within .contact-outline-input:valid + .contact-outline-label {
    color: #8b7658;
}

.account-select-field .contact-outline-input {
    padding-top: 18px;
    padding-bottom: 18px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23333' d='M1 1.5L6 6l5-4.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 12px;
    cursor: pointer;
}

.account-select-field .contact-outline-input:valid {
    padding-top: 20px;
    padding-bottom: 12px;
}

.contact-outline-field.is-invalid .contact-outline-input,
.contact-outline-field.is-invalid .account-phone-combo-inner {
    border-color: #c0392b;
}

.account-phone-combo {
    position: relative;
    overflow: visible;
    z-index: 1;
}

.account-phone-combo.is-open,
.account-phone-combo:has(.account-phone-dial-picker.is-open) {
    z-index: 30;
}

.account-phone-combo-inner {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    width: 100%;
    min-height: 52px;
    padding: 18px 20px 12px 16px;
    background-color: #fff;
    border: 0.5px solid rgba(142, 143, 144, 0.6);
    border-radius: 11px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    gap: 0;
}

.account-phone-combo:focus-within .account-phone-combo-inner {
    outline: none;
    border-color: #a08f72;
    box-shadow: 0 0 0 1px rgba(160, 143, 114, 0.25);
}

.account-phone-combo-label {
    top: 0;
    left: 22px;
    transform: translateY(-50%) scale(0.86);
    font-size: 14px;
    color: var(--dark-accent-gold, #8f7858);
    pointer-events: none;
}

.account-phone-combo:focus-within .account-phone-combo-label {
    color: #8b7658;
}

.account-phone-combo-prefix {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
    padding-right: 4px;
    position: relative;
    overflow: visible;
}

.account-phone-combo-flag {
    display: block;
    width: 22px;
    height: auto;
    max-height: 16px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.account-phone-combo-code {
    margin: 0;
    padding: 0 18px 0 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    min-width: 3ch;
    font-family: inherit;
}

.account-phone-dial-trigger {
    margin: 0;
    padding: 0 18px 0 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #111;
    cursor: pointer;
    min-width: 3ch;
    font-family: inherit;
    text-align: left;
}

.account-phone-dial-trigger:focus {
    outline: none;
}

.account-phone-dial-display {
    display: inline-block;
    min-width: 2.5ch;
}

.account-phone-dial-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: -16px;
    z-index: 40;
    display: none;
    flex-direction: column;
    width: min(320px, calc(100vw - 32px));
    max-height: min(320px, 50vh);
    background: #fff;
    border: 0.5px solid rgba(142, 143, 144, 0.6);
    border-radius: 11px;
    box-shadow: 0 12px 32px rgba(17, 17, 17, 0.14);
    overflow: hidden;
}

.account-phone-dial-dropdown.is-open {
    display: flex;
}

.account-phone-dial-search {
    display: block;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 0;
    border-bottom: 0.5px solid rgba(142, 143, 144, 0.35);
    background: #f8f9fa;
    font-size: 14px;
    line-height: 1.4;
    color: #111;
    font-family: inherit;
    flex-shrink: 0;
}

.account-phone-dial-search:focus {
    outline: none;
    background: #f0f1f2;
}

.account-phone-dial-list {
    list-style: none;
    margin: 0;
    padding: 6px 0;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.account-phone-dial-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.35;
    color: #111;
}

.account-phone-dial-option:hover,
.account-phone-dial-option.is-selected {
    background: #f0f1f2;
}

.account-phone-dial-option-flag {
    flex-shrink: 0;
    width: 22px;
    height: auto;
    max-height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.account-phone-dial-option-label {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-phone-dial-option-dial {
    flex-shrink: 0;
    color: #666;
    font-variant-numeric: tabular-nums;
}

.account-phone-dial-empty {
    padding: 12px 14px;
    font-size: 14px;
    color: #666;
}

.account-phone-combo-code:focus {
    outline: none;
}

.account-phone-combo-chevron {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 10px;
    height: 6px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23111' d='M1 1.5L6 6l5-4.5'/%3E%3C/svg%3E") no-repeat center;
    background-size: 10px 6px;
    pointer-events: none;
}

.account-phone-combo-sep {
    align-self: stretch;
    width: 0;
    min-height: 24px;
    margin: 0 14px 0 10px;
    border-left: 0.5px solid rgba(142, 143, 144, 0.65);
    flex-shrink: 0;
}

.account-phone-combo-number {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 400;
    color: #111;
    font-family: inherit;
}

.account-phone-combo-number:focus {
    outline: none;
}
