/* Centered modal and popup styling from main site's commonStyles.css */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.modal.show {
    display: block !important;
}

.modal-backdrop.show {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    z-index: 9990;
}

.modal-box {
    background: white;
    max-width: 900px;
    width: 90%;
    margin: 5% auto;
    border-radius: 16px;
    display: flex;
    flex-direction: row;
    position: relative;
    overflow: hidden;
}

.modal-banner-mobile {
    display: none;
    position: relative;
    width: 100%;
    height: 120px;
    overflow: hidden;
    flex-shrink: 0;
}

.modal-banner-mobile .banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-banner-mobile .banner-logo {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 80px;
    height: auto;
    opacity: 0.8;
}

.modal-left {
    width: 50%;
    padding: 40px;
    display: flex;
    flex-direction: column;
}

.modal-left h2 {
    margin-bottom: 20px;
}

.modal-left input,
.modal-left textarea {
    margin-bottom: 15px;
    padding: 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.input-with-button {
    position: relative;
}

.input-with-button input {
    padding-right: 100px;
}

.input-with-button button {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    padding: 6px 10px;
    font-size: 13px;
    background: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.submit-btn {
    background: black;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#otp-section {
    margin-top: 110px;
}

.modal-right {
    width: 50%;
}

.modal-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.close {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 28px;
    cursor: pointer;
    color: #744c4c;
}

.btn {
    padding: 10px;
    background-color: Gray;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: -3px;
    margin-left: 20px;
}

.phone-wrapper {
    display: flex;
    gap: 10px;
}

.country-code-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
    max-width: 100%;
}

.country-code-select {
    max-height: 150px;
    overflow-y: auto;
    width: 100px;
    height: 100%;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 6px 8px;
    box-sizing: border-box;
    transition: none !important;
}

.country-code-select option {
    white-space: nowrap;
}

.phone-input {
    width: 127%;
}

/* For Android Devices (commonly 360px wide, like Pixel phones) */
@media only screen and (max-width: 360px) {
    .phone-input {
        width: 120%;
    }

    .close {
        top: 120px;
        left: 93%;
    }
}

/* For iPhones with viewport width ~428px */
@media only screen and (min-width: 361px) and (max-width: 428px) {
    .phone-input {
        width: 135%;
    }

    .close {
        top: 125px;
        left: 93%;
    }
}

/* Responsive - Mobile View */
@media (max-width: 767px) {
    .modal-box {
        flex-direction: column;
        width: 95%;
        margin: 15% auto;
    }

    .modal-left {
        width: 100%;
        padding: 20px;
        text-align: center;
    }

    #otp-section {
        margin-top: 30px;
    }

    .modal-right {
        display: none;
    }

    .modal-banner-mobile {
        display: block !important;
    }

    .modal-banner-mobile .banner-img {
        display: block !important;
    }

    .modal-left h2 {
        margin-top: 0;
    }

    .input-with-button {
        position: relative;
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }

    .btn {
        margin-left: -2px;
    }

    .input-with-button input {
        width: 100%;
        padding-right: 120px;
        height: 44px;
        font-size: 14px;
        border-radius: 6px;
        box-sizing: border-box;
    }

    .input-with-button button {
        position: absolute;
        right: 10px;
        top: 50%;
        transform: translateY(-50%);
        padding: 8px 14px;
        font-size: 13px;
        background: #333;
        color: white;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        line-height: 1;
        height: 30px;
    }
}

/* Toast CSS */
.toast {
    visibility: hidden;
    min-width: 250px;
    max-width: 90%;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 8px;
    padding: 16px;
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.toast.show {
    visibility: visible;
    opacity: 1;
}

.custom-dropdown {
    position: relative;
}

.custom-dropdown .selected {
    flex: 0.6;
    background: #fff;
    border: 1px solid #ccc;
    padding: 0 10px;
    border-radius: 10px;
    height: 50px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    font-size: 15px;
}

.custom-dropdown .dropdown-list {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    max-height: 200px;
    overflow-y: auto;
    z-index: 999;
    border-radius: 5px;
    display: none;
}

.custom-dropdown .dropdown-list li {
    padding: 10px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.custom-dropdown .dropdown-list li:hover {
    background: #f0f0f0;
}

.phone-flex-iwrapper {
    display: flex;
    align-items: center;
    flex: 1.4;
}

.phone-flex-iwrapper input {
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 10px;
    font-size: 16px;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 0 !important;
}

#name, #email {
    width: 100%;
    height: 50px;
    border: 1px solid #ccc;
    border-radius: 10px;
    padding: 0 15px;
    box-sizing: border-box;
}

/* Button & Animations */
.btn3 {
    padding: 10px;
    background-color: #0E1F24;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.btn3.gradient {
    background: linear-gradient(135deg, #1b3d45 0%, #0a1619 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}

.btn3.gradient:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}
