/* Main Styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f0f0f0;
    -webkit-tap-highlight-color: transparent;
}

#container {
    width: 80%;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

#header {
    background-color: #25D366;
    color: white;
    padding: 20px;
    text-align: center;
}

#navigation {
    background-color: #128C7E;
    color: white;
    padding: 10px;
}

#BETALOGO {
    font-weight: bold;
}

#content-container {
    padding: 20px;
    text-align: center;
}

.input, select {
    padding: 10px;
    width: 100%;
    max-width: 280px;
    margin: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    height: 42px; /* Consistent height */
    box-sizing: border-box;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.button {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
}

.button:hover {
    background-color: #128C7E;
}

#search_results {
    padding: 20px;
    margin-top: 20px;
    text-align: center;
    display: none;
}

.result-container {
    border: 1px solid #ddd;
    padding: 15px;
    margin: 0 auto;
    max-width: 500px;
    background-color: #f9f9f9;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
}

.whatsapp-link {
    color: #25D366;
    font-weight: bold;
    word-break: break-all;
}

.whatsapp-button {
    display: inline-block;
    background-color: #25D366;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 10px 5px;
    cursor: pointer;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s, transform 0.2s;
    box-sizing: border-box;
    text-align: center;
    width: calc(100% - 10px);
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-button:hover {
    background-color: #128C7E;
}

.web-button {
    background-color: #34B7F1;
}

.web-button:hover {
    background-color: #0091DA;
}

.formatted-number {
    margin: 10px 0;
    font-size: 16px;
}

.result-item {
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.button-separator {
    height: 1px;
    background-color: #eee;
    margin: 5px 0;
    display: none;
}

.share-tip {
    margin-top: 15px;
    font-size: 0.9em;
    color: #666;
    display: none;
}

.error {
    color: red;
}

#footer {
    background-color: #128C7E;
    color: white;
    text-align: center;
    padding: 10px;
    margin-top: 20px;
}

/* Responsive design */
@media (max-width: 768px) {
    #container {
        width: 100%;
        box-shadow: none;
    }
    
    #content-container {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .input, select {
        width: calc(100% - 40px) !important;
        max-width: 280px !important;
        margin: 8px auto !important;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    select option {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    
    .button {
        width: calc(100% - 40px);
        max-width: 280px;
        margin: 15px auto;
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .result-container {
        width: calc(100% - 40px);
        max-width: 300px;
    }
    
    .whatsapp-button {
        display: block;
        width: 100%;
        margin: 10px 0;
        text-align: center;
    }
    
    #header h1 {
        font-size: 1.5rem;
    }
}

/* Loading indicator */
.loading-indicator {
    display: none;
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #25D366;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Select Element Styling Fixes for Mobile */

/* Fix text color and styling for all devices */
select#country {
    /* Consistent text color (not blue like links) */
    color: #333 !important;
    /* Ensure text is visible against background */
    background-color: #f8f8f8 !important;
    /* Remove default styling from different mobile browsers */
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    /* Add custom arrow for dropdown */
    background-image: url("data:image/svg+xml;utf8,<svg fill='%23333' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>") !important;
    background-repeat: no-repeat !important;
    background-position: right 8px center !important;
    padding-right: 30px !important;
    /* Other styling */
    border: none !important;
    border-radius: 4px !important;
    font-size: 16px !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    select#country {
        /* iOS specific select styling */
        font-size: 16px !important; /* Prevents zoom */
        text-indent: 1px !important;
        text-overflow: '' !important;
    }
}

/* Android specific fixes */
@supports (-webkit-appearance:none) and (not (-webkit-touch-callout:none)) {
    select#country {
        /* Android specific select styling */
        padding-left: 8px !important;
    }
}

/* Darker text for options in the dropdown */
select#country option {
    color: #333 !important;
    font-size: 16px !important;
    background-color: white !important;
}

/* Style for disabled options (like separators) */
select#country option[disabled] {
    color: #999 !important;
    background-color: #f5f5f5 !important;
    font-size: 14px !important;
}

/* For systems that support focus styles */
select#country:focus {
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2) !important;
}