﻿/* 🔹 Wrapper */
.custom-dropdown {
    width: 220px;
    position: relative;
    font-family: Arial, sans-serif;
    overflow: visible; /* allow dropdown to show */
}

    /* 🔹 Input */
 .custom-dropdown input[type="text"] {
        width: 100%;
        padding: 10px 12px;
        border: 1px solid #aaa;
        border-radius: 30px;
        box-sizing: border-box;
        font-size: 16px;
     /*   background: #E8E5E5;*/
        outline: none;
        z-index: 1;
    }

    .countrycl1 input[type="text"] {
        background: #E8E5E5
    }

/* 🔹 Dropdown List */
.dropdown-list {
    position: absolute;
    top: calc(100% + 2px); /* avoid white gap */
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    background: #fff;
    display: none; /* initially hidden */
    width: 100%;
    z-index: 9999;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    margin: 0; /* remove white gaps */
    padding: 0;
}

/* 🔹 Dropdown Item */
.dropdown-item {
    display: block;
    text-align: left;
    padding: 12px 15px;
    cursor: pointer;
    background: #fff;
    color: #000;
    line-height: normal;
    margin: 0;
}

    /* Hover / Active states */
    .dropdown-item:hover,
    .dropdown-item:active,
    .dropdown-item:focus {
        background: #f4a533;
        color: #fff;
    }

/* 🔹 Hide ghost scrollbar on iOS Safari */
.dropdown-list::-webkit-scrollbar {
    display: none;
}

/* ===============================
   📱 Mobile-specific fixes
   =============================== */

/* Small screens (phones) */
@media (max-width: 767px) {
    .custom-dropdown {
        width: 100%; /* full width on mobile */
    }

        .custom-dropdown input[type="text"] {
            font-size: 18px;
            height: 48px;
            padding-left: 45px; /* if you want room for an icon */
        }

    .dropdown-list {
        max-height: 250px; /* taller for mobile scroll */
        font-size: 16px;
    }

    .dropdown-item {
        padding: 14px 18px;
        font-size: 16px;
    }
}

/* Larger tablets */
@media (min-width: 768px) and (max-width: 1024px) {
    .custom-dropdown {
        width: 300px;
    }

        .custom-dropdown input[type="text"] {
            font-size: 17px;
        }
}
