/* Country Code Dropdown Styles */
.phone-input-container {
    display: flex;
    align-items: center;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.dark-mode .phone-input-container {
    background-color: #2d3748;
}

.country-code-dropdown {
    width: 120px;
    padding: 12px 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    max-height: 300px;
    overflow-y: auto;
    color: var(--text-color);
}

.dark-mode .country-code-dropdown {
    background-color: #2d3748;
    border-color: #4a5568;
    color: #e2e8f0;
}

.phone-input {
    flex: 1;
    border-left: none !important;
    border-radius: 0 8px 8px 0 !important;
    padding: 12px 15px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

.dark-mode .phone-input {
    background-color: #2d3748;
    color: #e2e8f0;
}

/* For popup and panel forms */
.popup-form .phone-input-container,
.panel-form .phone-input-container {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    background-color: rgba(255, 255, 255, 0.9);
}

.dark-mode .popup-form .phone-input-container,
.dark-mode .panel-form .phone-input-container {
    background-color: rgba(50, 50, 50, 0.9);
}

.popup-form .country-code-dropdown,
.panel-form .country-code-dropdown {
    border-radius: 8px 0 0 8px;
    padding: 12px 10px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-right: none;
    width: 120px;
    max-height: 300px;
    overflow-y: auto;
    color: var(--text-color);
}

.dark-mode .popup-form .country-code-dropdown,
.dark-mode .panel-form .country-code-dropdown {
    background-color: rgba(50, 50, 50, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-right: none;
    color: #ffffff;
}

.popup-form .phone-input,
.panel-form .phone-input {
    padding: 12px 15px;
    border-radius: 0 8px 8px 0 !important;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
}

.dark-mode .popup-form .phone-input,
.dark-mode .panel-form .phone-input {
    background-color: rgba(50, 50, 50, 0.9);
    color: #ffffff;
}

.input-icon.phone-icon {
    display: flex;
    padding-left: 0;
    position: relative;
}

.input-icon.phone-icon i {
    left: 15px;
    z-index: 2;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
}

.dark-mode .input-icon.phone-icon i {
    color: var(--secondary-color);
}

/* Fix for country code overlapping with phone icon */
.phone-input-container {
    padding-left: 40px; /* Add space for the icon */
}

.panel-form .phone-input-container,
.popup-form .phone-input-container {
    padding-left: 40px; /* Same space for consistency */
}

/* Focus styles for phone input */
.phone-input:focus,
.country-code-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.dark-mode .phone-input:focus,
.dark-mode .country-code-dropdown:focus {
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.4);
}

.input-icon.phone-icon:hover .phone-input-container {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dark-mode .input-icon.phone-icon:hover .phone-input-container {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.optional-label {
    font-size: 0.8rem;
    color: #666;
    margin-left: 5px;
    font-weight: normal;
}

body.dark-mode .optional-label {
    color: #9ca3af;
}
