/* Custom flag dropdown (see public/js/flag-select.js) */

/* Visually hidden but still focusable, so `required` validation on the
   native select keeps working (display:none breaks it). */
.flag-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.flag-select {
    position: relative;
    width: 100%;
}

.flag-select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    height: 50px;
    padding: 0 40px 0 16px;
    border: 0;
    border-radius: 10px;
    background: #f8f8f8;
    font-family: "Barlow", "Noto Sans Arabic", "Segoe UI", sans-serif;
    font-size: 14px;
    color: #111111;
    cursor: pointer;
    text-align: left;
}

.flag-select-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.flag-select-img {
    width: 27px;
    height: 18px;
    border-radius: 2px;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.flag-select-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.flag-select-text--placeholder {
    color: #999999;
}

.flag-select-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    width: 13px;
    height: 11px;
    transform: translateY(-50%);
    pointer-events: none;
    color: #999999;
}

.flag-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 500;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #ffffff;
    border: 1px solid #ececec;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    max-height: 260px;
    overflow-y: auto;
}

.flag-select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: "Barlow", "Noto Sans Arabic", "Segoe UI", sans-serif;
    font-size: 14px;
    color: #111111;
    cursor: pointer;
}

.flag-select-item:hover {
    background: #f4f4f5;
}

.flag-select-item.is-selected {
    background: #fdeeee;
    font-weight: 600;
}

[dir="rtl"] .flag-select-btn {
    padding: 0 16px 0 40px;
    text-align: right;
}

[dir="rtl"] .flag-select-arrow {
    right: auto;
    left: 16px;
}
