/**
 * OtpPal Phone Input Styles
 */

/* Phone Input Wrapper */
.otppal-phone-input-wrapper {
    display: flex;
    gap: 10px;
    margin: 0 0 20px 0;
    align-items: stretch;
    max-width: 100%;
    box-sizing: border-box;
}

/* Country Select (kept hidden but accessible for JS) */
.otppal-country-select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    height: 0;
    width: 0;
}

/* Country combobox with autocomplete */
.otppal-country-combobox {
    position: relative;
    flex: 0 0 200px;
    min-width: 0;
    max-width: 100%;
    font-size: 14px;
}

.otppal-country-search {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    cursor: text;
}

.otppal-country-search:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px rgba(0,115,170,0.2);
}

.otppal-country-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 4px;
    background-color: #fff;
    border-radius: 4px;
    border: 1px solid #ddd;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    z-index: 9999;
    display: none;
}

.otppal-country-dropdown-open {
    display: block;
}

.otppal-country-option {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    cursor: pointer;
    font-size: 14px;
}

.otppal-country-option:hover,
.otppal-country-option-highlighted {
    background-color: #f3f4f5;
}

.otppal-country-flag {
    margin-right: 8px;
    font-size: 18px;
    width: 1.5em;
    text-align: center;
}

.otppal-country-label {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.otppal-country-dial {
    margin-left: 8px;
    color: #555d66;
    font-weight: 500;
}

.otppal-country-empty {
    padding: 8px 10px;
    color: #555d66;
    font-size: 13px;
}

/* Phone Input */
.otppal-phone-input {
    flex: 1;
    padding: 12px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

.otppal-phone-input:focus {
    outline: none;
    border-color: #0073aa;
}

/* National Format (no country select) */
.otppal-phone-input-national {
    width: 100%;
    max-width: 100%;
}

/* Validation States */
.otppal-phone-input.otppal-valid {
    border-color: #00a32a;
}

.otppal-phone-input.otppal-invalid {
    border-color: #d63638;
}

/* Responsive */
@media (max-width: 600px) {
    .otppal-phone-input-wrapper {
        flex-direction: column;
    }

    .otppal-country-select {
        width: 100%;
        min-width: auto;
    }
}

