/* 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;
}

.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: 5px;
    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;
}

.account-phone-combo-flag {
    display: block;
    width: 22px;
    height: auto;
    max-height: 16px;
    object-fit: cover;
    border-radius: 5px;
    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-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;
}
