/* ===== MODERN RESPONSIVE FWA GUI ===== */
/* Mobile-first responsive design */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: #333;
}

/* Prevent iOS zoom on input focus */
input, select, textarea {
    font-size: 16px !important;
}

/* Background */
body#com4_fwa {
    background: url('../img/shutterstock_756983191.jpg') center center/cover no-repeat fixed;
    background-color: #0a1428;
    min-height: 100vh;
}

/* App container */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px 10px;
}

/* Search section */
.search-section {
    width: 100%;
    max-width: 500px;
}

/* Search card */
.search-card {
    background: rgba(245, 245, 245, 0.95);
    border-radius: 12px;
    padding: 21px;
    box-shadow: 0 8px 32px rgba(0, 190, 190, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Typography */
.search-title {
    font-size: 1.5rem;
    font-weight: 500;
    text-align: center;
    margin: 0 0 8px 0;
    color: #070c29;
}

.search-subtitle {
    font-size: 0.95rem;
    text-align: center;
    margin: 0 0 24px 0;
    color: #555;
    line-height: 1.4;
}

/* Form styles */
.search-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.form-row .form-group {
    margin-bottom: 0;
    flex: 1;
}

.form-row .flex-grow {
    flex: 2;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 4px;
    color: #070c29;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    background: white;
}

.form-input:focus {
    outline: none;
    border-color: #2bde9b;
    box-shadow: 0 0 0 3px rgba(43, 222, 155, 0.15);
}

.form-input:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Hide datalist dropdown arrows on all datalist inputs */
input[list]::-webkit-calendar-picker-indicator {
    display: none !important;
}

input[list]::-webkit-list-button {
    display: none !important;
}

/* Additional datalist arrow hiding for different browsers */
input[list]::-ms-expand {
    display: none !important;
}

input[list] {
    background-image: none !important;
}


.poststed-display {
    font-size: 0.85rem;
    color: #666;
    margin-top: 4px;
    min-height: 18px;
}

/* Search button */
.form-actions {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.search-btn {
    background-color: #2bde9b;
    color: #FFFFFF;
    border: 0px none #000000;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    text-decoration: none;
    padding-top: 14px;
    padding-right: 18px;
    padding-bottom: 14px;
    padding-left: 18px;
    min-width: 150px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.search-btn:hover {
    background-color: rgba(0,80,115,1.0);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 80, 115, 0.25);
}

.search-btn:active {
    transform: translateY(0);
}

.search-btn:disabled {
    background-color: rgba(0,80,115,1.0);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 80, 115, 0.25);
}

/* Spinner animation */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spin {
    animation: spin 1s linear infinite;
}

/* Coordinate info */
.coordinate-info {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin: 12px 0;
}

.coordinate-info a {
    color: #0056b3;            /* Default blue */
    text-decoration: underline;
}

.coordinate-info a:hover {
    color: #003d80;             /* Darker blue */
    text-decoration: underline; /* Keep underline */
}

.coordinate-info a:visited {
    color: #551a8b;             /* Optional: purple-ish */
}

/* Toggle switch */
.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 0 0 0;
    border-top: 1px solid #eee;
    margin-top: 16px;
}

.toggle-label {
    font-size: 0.9rem;
    color: #666;
    cursor: default;
    transition: color 0.2s ease;
    user-select: none;
}

.toggle-label.active {
    color: #070c29;
    font-weight: 500;
}

.toggle-label i {
    margin-right: 4px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #2bde9b;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* Results section */
.results-section {
    width: 100%;
    max-width: 600px;
    margin-top: 20px;
}

.results-card {
    background: rgba(245, 245, 245, 0.95);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 8px 32px rgba(0, 190, 190, 0.3);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Result content styles */
.result-title {
    font-size: 1.1rem;
    text-align: center;
    margin: 0 0 20px 0;
    color: #333;
}

.speed-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.speed-text {
    font-size: 2rem;
    font-weight: 600;
    color: #070c29;
}

.network-icon {
    width: 48px;
    height: 48px;
    background-size: contain;
    background-repeat: no-repeat;
}

.network-icon.icon-4g {
    background-image: url('../img/svg/4g.svg');
}

.network-icon.icon-5g {
    background-image: url('../img/svg/5G.svg');
}

/* Installation info */
.installation-info {
    text-align: center;
    margin: 16px 0;
    font-size: 0.95rem;
    color: #555;
}

/* Result buttons */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.result-btn {
    background-color: #2bde9b;
    border: 0px none #000000;
    color: #FFFFFF;
    padding-top: 12px;
    padding-right: 18px;
    padding-bottom: 12px;
    padding-left: 18px;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.result-btn:hover {
    background-color: rgba(0,80,115,1.0);
}

.result-btn.primary {
    background-color: #2bde9b;
    color: #FFFFFF;
}

.result-btn.primary:hover {
    background-color: rgba(0,80,115,1.0);
}

/* Error message */
.error-message {
    text-align: center;
    padding: 20px;
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
}

.error-message h3 {
    margin: 0 0 12px 0;
    color: #721c24;
}

/* Comments */
.result-comments {
    font-size: 0.8rem;
    color: #666;
    margin: 20px 0;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.result-comments ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.result-comments li {
    text-align: center;
    margin-bottom: 8px;
}

.result-comments li:last-child {
    margin-bottom: 0;
}

/* COM4 Logo integrated in cards */
.search-card-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.com4-logo-integrated {
    opacity: 0.7;
    transition: opacity 0.2s ease;
    text-decoration: none;
}

.com4-logo-integrated:hover {
    opacity: 1;
}

.com4-logo-small {
    height: 24px;
    width: auto;
}

/* Responsive logo adjustments */
@media (max-height: 500px) {
    .search-card {
        padding: 16px;
    }
    
    .search-title {
        font-size: 1.3rem;
    }
    
    .com4-logo-small {
        height: 20px;
    }
    
    .search-card-footer {
        margin-top: 12px;
        padding-top: 8px;
    }
}

/* ===== TABLET STYLES ===== */
@media (min-width: 768px) {
    .app-container {
        padding: 40px 20px;
    }
    
    .search-section {
        max-width: 600px;
    }
    
    .search-card {
        padding: 32px;
    }
    
    .search-title {
        font-size: 1.75rem;
    }
    
    .search-subtitle {
        font-size: 1rem;
    }
    
    .form-row {
        gap: 16px;
    }
    
    .form-input {
        padding: 14px;
    }
    
    .search-btn {
        padding: 14px 40px;
        font-size: 1.1rem;
    }
    
    .results-section {
        max-width: 700px;
    }
    
    .results-card {
        padding: 32px;
    }
    
    .speed-text {
        font-size: 2.5rem;
    }
    
    .network-icon {
        width: 56px;
        height: 56px;
    }
    
    .com4-logo-small {
        height: 28px;
    }
}

/* ===== DESKTOP STYLES ===== */
@media (min-width: 1024px) {
    .app-container {
        padding: 60px 40px;
    }
    
    .search-section {
        max-width: 640px;
    }
    
    .search-card {
        padding: 20px;
    }
    
    .search-title {
        font-size: 2rem;
    }
    
    .form-row {
        gap: 20px;
    }
    
    .form-input {
        padding: 16px;
    }
    
    .search-btn {
        padding: 16px 48px;
        font-size: 1.1rem;
    }
    
    .results-section {
        max-width: 800px;
    }
    
    .results-card {
        padding: 40px;
    }
    
    .speed-display {
        gap: 24px;
        padding: 24px;
    }
    
    .speed-text {
        font-size: 3rem;
    }
    
    .network-icon {
        width: 64px;
        height: 64px;
    }
    
    .result-actions {
        gap: 16px;
    }
    
    .result-btn {
        padding: 12px 24px;
        font-size: 1rem;
    }
    
    .com4-logo-small {
        height: 32px;
    }
}

/* ===== SVG ICON STYLES ===== */
.com4-4G, .com4-5G {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.com4-4G {
    background-image: url('../img/svg/4g.svg');
}

.com4-5G {
    background-image: url('../img/svg/5G.svg');
}

/* Legacy support for existing icon classes */
.com4-4G-small, .com4-5G-small {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    width: 2rem;
    height: 2rem;
    display: inline-block;
}

.com4-4G-small {
    background-image: url('../img/svg/4g.svg');
}

.com4-5G-small {
    background-image: url('../img/svg/5G.svg');
}

/* Font classes for backward compatibility */
.com4_font {
    font-family: 'Red Hat Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Button classes for backward compatibility */
.com4_btn {
    background-color: #2bde9b;
    color: #FFFFFF;
    border: 0px none #000000;
    padding-top: 12px;
    padding-right: 18px;
    padding-bottom: 12px;
    padding-left: 18px;
    border-radius: 50px;
    font-size: 16px;
    font-family: 'Montserrat', sans-serif;
    font-style: normal;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.com4_btn:hover {
    background-color: rgba(0,80,115,1.0);
    transform: translateY(-1px);
}

.com4-btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

.com4-btn-wide {
    padding: 10px 24px;
    min-width: 140px;
   }