/* Virtual Cavity RF Simulator Web Version - Styles */

:root {
    --primary-color: #667eea;
    --secondary-color: #764ba2;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --dark-color: #343a40;
    --light-color: #f8f9fa;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.2rem;
}

.card {
    border: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    transition: transform 0.2s ease-in-out;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border: none;
    font-weight: 600;
}

.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.form-range {
    height: 6px;
}

.form-range::-webkit-slider-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.form-range::-moz-range-thumb {
    height: 20px;
    width: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.alert {
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
}

.parameter-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    margin-bottom: 10px;
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-running {
    background-color: var(--success-color);
    animation: pulse 2s infinite;
}

.status-stopped {
    background-color: var(--danger-color);
}

.status-recording {
    background-color: var(--warning-color);
    animation: blink 1s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }

    100% {
        opacity: 1;
    }
}

@keyframes blink {

    0%,
    50% {
        opacity: 1;
    }

    51%,
    100% {
        opacity: 0.3;
    }
}

.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
}

.small-chart-container {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-body {
        padding: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .h5 {
        font-size: 1.1rem;
    }

    .chart-container {
        height: 300px;
    }

    .small-chart-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding: 0.5rem;
    }

    .card {
        margin-bottom: 1rem;
    }

    .chart-container {
        height: 250px;
    }

    .small-chart-container {
        height: 180px;
    }
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, .3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip styles */
.tooltip {
    font-size: 0.8rem;
}

/* Chart legend custom styles */
.chart-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 0 10px 5px 0;
    font-size: 0.9rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

/* Animation for data updates */
.data-update {
    animation: dataFlash 0.3s ease-in-out;
}

@keyframes dataFlash {
    0% {
        background-color: rgba(102, 126, 234, 0.1);
    }

    50% {
        background-color: rgba(102, 126, 234, 0.3);
    }

    100% {
        background-color: transparent;
    }
}

/* Enhanced button states */
.btn-success:not(:disabled):hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-danger:not(:disabled):hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-warning:not(:disabled):hover {
    background-color: #e0a800;
    border-color: #d39e00;
}

/* Form enhancements */
.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-check-label {
    font-weight: 500;
}

/* Status badge */
.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}