/* WiFi Speed Test Plugin Styles - Inspired by Speedtest.net */
#wifi-speed-test-container {
    max-width: 500px;
    margin: 20px auto;
    padding: 25px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    border: 1px solid #eaeaea;
}

.wifi-speed-test-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.wifi-speed-test-header h2 {
    color: #2c3e50;
    margin: 0 0 10px 0;
    font-weight: 600;
    font-size: 24px;
}

.wifi-speed-test-header p {
    color: #7f8c8d;
    margin: 0;
    font-size: 16px;
}

.wifi-speed-test-controls {
    text-align: center;
    margin-bottom: 30px;
}

.wifi-speed-test-controls .button {
    margin: 0 10px;
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wifi-speed-test-controls .button-primary {
    background-color: #3498db;
    color: white;
    box-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
}

.wifi-speed-test-controls .button-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.4);
}

.wifi-speed-test-controls .button-primary:active {
    transform: translateY(0);
}

.wifi-speed-test-controls .button-secondary {
    background-color: #95a5a6;
    color: white;
    box-shadow: 0 2px 4px rgba(149, 165, 166, 0.3);
}

.wifi-speed-test-controls .button-secondary:hover {
    background-color: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.4);
}

.wifi-speed-test-controls .button-secondary:active {
    transform: translateY(0);
}

.wifi-speed-test-controls .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.wifi-speed-test-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #eee;
}

.wifi-speed-test-metric {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.wifi-speed-test-metric label {
    display: block;
    font-size: 13px;
    color: #95a5a6;
    margin-bottom: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wifi-speed-test-metric span {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.wifi-speed-test-metric span.units {
    font-size: 16px;
    font-weight: 400;
    color: #7f8c8d;
    margin-left: 4px;
    vertical-align: super;
}

.wifi-speed-test-progress {
    margin-bottom: 25px;
    text-align: center;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #ecf0f1;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2c80b9);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

#progress-text {
    font-size: 14px;
    color: #7f8c8d;
    font-weight: 500;
    min-height: 18px;
    display: inline-block;
}

.wifi-speed-test-log {
    max-height: 180px;
    overflow-y: auto;
    padding: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #eee;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    line-height: 1.5;
}

.wifi-speed-test-log::-webkit-scrollbar {
    width: 6px;
}

.wifi-speed-test-log::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.wifi-speed-test-log::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.wifi-speed-test-log::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

.wifi-speed-test-log.entry {
    margin-bottom: 6px;
    padding: 8px 12px;
    background-color: white;
    border-left: 3px solid #3498db;
    border-radius: 0 4px 4px 0;
    display: flex;
    align-items: center;
}

.wifi-speed-test-log.entry.timestamp {
    font-weight: 600;
    color: #2c3e50;
    font-size: 12px;
}

.wifi-speed-test-log.entry.message {
    flex: 1;
    color: #34495e;
}

.wifi-speed-test-log.entry.success {
    border-left-color: #27ae60;
    background-color: #ebfbee;
}

.wifi-speed-test-log.entry.error {
    border-left-color: #e74c3c;
    background-color: #fdebeb;
}

.wifi-speed-test-log.entry.info {
    border-left-color: #3498db;
    background-color: #ebf5fb;
}

.wifi-speed-test-log.entry.warning {
    border-left-color: #f39c12;
    background-color: #fef9e7;
}

/* Animation for testing state */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.button-primary.testing {
    animation: pulse 1.5s infinite;
    background-color: #e74c3c !important;
}

.button-primary.testing:hover {
    background-color: #c0392b !important;
}

/* Responsive design */
@media (max-width: 480px) {
    #wifi-speed-test-container {
        margin: 15px;
        padding: 20px;
    }

    .wifi-speed-test-controls {
        flex-direction: column;
    }

    .wifi-speed-test-controls .button {
        margin: 10px 0;
        width: 100%;
    }

    .wifi-speed-test-header h2 {
        font-size: 20px;
    }

    .wifi-speed-test-metric span {
        font-size: 24px;
    }
}

/* Hover effects for metrics */
.wifi-speed-test-metric:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.wifi-speed-test-metric:hover label {
    color: #7f8c8d;
}