* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Rubik', sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

.popup-container {
    display: flex;
    max-width: 1000px;
    width: 90%;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    max-height: 80vh;
}

.form-section {
    flex: 1;
    padding: 1.5rem;
    background: white;
    position: relative;
}

.form-section h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 40px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #555;
}

input {
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: border-color 0.3s;
}

input:focus {
    outline: none;
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.phone-group {
    display: flex;
    gap: 0.5rem;
}

.country-dropdown-container {
    position: relative;
    flex: 0 0 150px;
}

.country-dropdown {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    cursor: pointer;
    background: white;
    height: 100%;
    overflow: hidden;
}

.country-dropdown.active {
    border-color: #4a90e2;
    box-shadow: 0 0 0 2px rgba(74, 144, 226, 0.2);
}

.selected-flag {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    overflow: hidden;
}

.flag-icon {
    width: 18px;
    height: 13px;
    object-fit: cover;
    border-radius: 2px;
    flex-shrink: 0;
}

.arrow {
    transition: transform 0.2s;
    flex-shrink: 0;
    font-size: 0.8rem;
}

.country-dropdown.active .arrow {
    transform: rotate(180deg);
}

.country-list {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 250px;
    max-height: 250px;
    overflow-y: auto;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
}

.country-list.show {
    display: block;
}

.country-search {
    padding: 0.6rem;
    position: sticky;
    top: 0;
    background: white;
    border-bottom: 1px solid #eee;
    z-index: 1;
}

.country-search input {
    width: 100%;
    padding: 0.5rem;
    font-size: 0.85rem;
}

.country-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    gap: 0.6rem;
    font-size: 0.85rem;
    position: relative;
}

.country-item:hover, .country-item:focus {
    background-color: #e8f0fe;
}

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

.country-code {
    color: #777;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.phone-number {
    flex: 1;
}

.submit-btn {
    background-color: #000;
    color: white;
    border: none;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
    margin-top: 0.3rem;
}

.submit-btn:hover {
    background-color: #c5aa12;
}

.content-section {
    flex: 1;
    padding: 1.5rem;
    background: linear-gradient(135deg, #DAB39E 0%, #F5E8E4 100%);
    color: #2c3e50;
    position: relative;
}

.content-section h1 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.3;
    margin-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 40px;
}

.subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.feature-item {
    background: #EED4C4;
    padding: 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #2c3e50;
}

.contact-section {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.8rem;
    color: #2c3e50;
}

.contact-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #EED4C4;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    color: #555;
    z-index: 1000;
    margin-top: 0;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 5;
    display: block;
}

/* Enhanced mobile responsiveness */
@media (max-width: 992px) {
    .popup-container {
        width: 95%;
        max-height: 85vh;
        margin: 30px auto;
    }
}

/* Hide content section on mobile devices */
@media (max-width: 768px) {
    .popup-container {
        flex-direction: column;
        width: 90%;
        max-height: 80vh;
        overflow-y: auto;
        margin: 25px auto;
        max-width: 500px; /* Limit width since we only have one section now */
    }

    .content-section {
        display: none; /* Hide the content section */
    }

    .form-section {
        padding: 1.5rem;
        width: 100%;
    }

    .form-section h2 {
        padding-right: 35px;
    }

    .close-btn {
        position: absolute;
        top: 1rem;
        right: 1rem;
    }

    .submit-btn {
        padding: 0.7rem;
    }
}

@media (max-width: 576px) {
    .popup-container {
        width: 92%;
        height: auto;
        max-height: 85vh;
        border-radius: 12px;
        margin: 20px auto;
    }

    .form-section h2 {
        padding-right: 30px;
    }

    .close-btn {
        top: 1rem;
        right: 1rem;
    }

    input, .country-dropdown {
        padding: 0.5rem 0.7rem;
    }
}

@media (max-width: 480px) {
    .popup-container {
        width: 90%;
        margin: 15px auto;
    }

    .form-section h2 {
        padding-right: 28px;
    }

    .close-btn {
        top: 1rem;
        right: 0.8rem;
    }

    .phone-group {
        flex-direction: column;
        gap: 0.5rem;
    }

    .country-dropdown-container {
        width: 100%;
        flex: unset;
    }

    .country-dropdown {
        width: 100%;
    }

    .phone-number {
        width: 100%;
    }

    .country-list {
        width: 100%;
        min-width: 100%;
        max-width: 100%;
    }

    .selected-flag {
        width: auto;
    }

    .country-item {
        padding: 0.8rem;
    }

    form {
        gap: 0.6rem;
    }

    .input-group {
        gap: 0.2rem;
    }

    .contact-item {
        font-size: 0.75rem;
    }
}

@media (max-width: 360px) {
    .popup-container {
        width: 92%;
        max-height: 82vh;
        margin: 10px auto;
    }

    .form-section h2 {
        padding-right: 25px;
    }

    .close-btn {
        top: 1rem;
        right: 0.7rem;
    }

    .country-dropdown, .phone-number, input {
        padding: 0.7rem 0.5rem;
    }
}

@media (hover: none) {
    .submit-btn {
        padding: 0.9rem;
    }

    .country-item {
        padding: 0.8rem;
    }

    input, .country-dropdown {
        font-size: 16px;
    }
}

.flash-message {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.flash-message.show {
    opacity: 1;
}

.success-message {
    background-color: #4CAF50;
    color: white;
    border-left: 4px solid #2E7D32;
}

.error-message {
    background-color: #F44336;
    color: white;
    border-left: 4px solid #B71C1C;
}

@media (max-width: 480px) {
    .flash-message {
        width: 85%;
        text-align: center;
    }
}