/* Telefon girişi — ülke kodu + numara (libphonenumber-js) */

.op-phone-field {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    width: 100%;
}

.op-phone-field__row {
    display: flex;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
}

.op-phone-field__country,
.op-phone-field__country-static {
    box-sizing: border-box;
    flex: 0 0 6.75rem;
    width: 6.75rem;
    min-width: 6.75rem;
    max-width: 6.75rem;
    min-height: 48px;
    padding: 0 0.55rem;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background-color: #fafafa;
    color: #18181b;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.01em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.op-phone-field__country-static {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    user-select: none;
    pointer-events: none;
    cursor: default;
}

.op-phone-field--country-locked .op-phone-field__country {
    display: none;
}

.op-phone-field__country {
    outline: none;
    cursor: pointer;
    padding-right: 1.65rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.45rem center;
    background-size: 12px 12px;
}

.op-phone-field__country:focus {
    border-color: rgba(24, 24, 27, 0.35);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.1);
    background-color: #fff;
}

.op-phone-field__number {
    box-sizing: border-box;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
    min-height: 48px;
    padding: 0.75rem 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #e4e4e7;
    background-color: #fff;
    color: #18181b;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.op-phone-field__number::placeholder {
    color: #a1a1aa;
}

.op-phone-field__number:focus {
    border-color: rgba(37, 211, 102, 0.55);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

.op-phone-field--admin .op-phone-field__country:focus,
.op-phone-field--admin .op-phone-field__number:focus {
    border-color: rgba(24, 24, 27, 0.35);
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.1);
}

.op-phone-field--admin .op-phone-field__number:focus {
    border-color: rgba(24, 24, 27, 0.35);
}

.op-phone-field--invalid .op-phone-field__country,
.op-phone-field--invalid .op-phone-field__country-static,
.op-phone-field--invalid .op-phone-field__number {
    border-color: #fca5a5;
}

.op-phone-field__hint {
    font-size: 0.625rem;
    color: #a1a1aa;
    line-height: 1.4;
}

.op-phone-field__hint--error {
    color: #b91c1c;
}

@media (min-width: 640px) {
    .op-phone-field__country,
    .op-phone-field__country-static {
        font-size: 0.875rem;
    }

    .op-phone-field__number {
        font-size: 0.875rem;
    }
}

@media (max-width: 380px) {
    .op-phone-field__country,
    .op-phone-field__country-static {
        flex-basis: 6.25rem;
        width: 6.25rem;
        min-width: 6.25rem;
        max-width: 6.25rem;
        font-size: 0.75rem;
    }

    .op-phone-field__country {
        padding-right: 1.45rem;
    }
}
