/* Status page specific styles */

/* User Configuration Badge */
.user-config-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.user-config-card h3 {
    color: white;
    margin-bottom: 1rem;
}

.user-config-badge {
    padding: 1rem;
}

.user-config-info {
    background: rgba(255, 255, 255, 0.1);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
}

.pattern-summary {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1rem 0;
}

.pattern-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.pattern-count {
    font-weight: bold;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.875rem;
}

.config-actions {
    text-align: center;
    margin-top: 1rem;
}

.config-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.config-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.header-nav {
    text-align: left;
    margin-bottom: 20px;
}

.back-btn {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    transition: all 0.3s ease;
    display: inline-block;
}

.back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-2px);
}

/* Status section */
.status-section {
    margin-bottom: 40px;
}

.main-status {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    text-align: center;
}

.status-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.status-indicator-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    font-weight: bold;
    position: relative;
}

.status-indicator-large::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.status-online {
    background: #28a745;
}

.status-online::after {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
}

.status-partial {
    background: #ffc107;
}

.status-partial::after {
    box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
}

.status-offline {
    background: #dc3545;
}

.status-offline::after {
    box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
}

.status-error {
    background: #6c757d;
}

.status-error::after {
    box-shadow: 0 0 0 0 rgba(108, 117, 125, 0.7);
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.status-text h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #2c3e50;
}

.status-text p {
    margin: 5px 0 0 0;
    color: #666;
}

.last-updated {
    margin-top: 20px;
    color: #666;
    font-size: 0.9rem;
}

/* Controllers section */
.controllers-section {
    margin-bottom: 40px;
}

.controllers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.controller-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.controller-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.controller-list {
    min-height: 100px;
}

.controller-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 4px solid #28a745;
}

.controller-item:last-child {
    margin-bottom: 0;
}

.controller-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 8px;
}

.controller-callsign {
    font-weight: bold;
    color: #2c3e50;
    font-size: 1.1rem;
}

.controller-frequency {
    background: #e9ecef;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #495057;
}

.controller-name {
    color: #666;
    font-size: 0.9rem;
}

.controller-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 8px;
    font-size: 0.85rem;
    color: #666;
}

.no-controllers {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.loading-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
    color: #666;
}

/* Info section */
.info-section {
    margin-bottom: 40px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.info-card h3 {
    margin-bottom: 20px;
    color: #2c3e50;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 10px;
}

.stats-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.stat-label {
    color: #666;
    font-weight: 500;
}

.stat-value {
    color: #2c3e50;
    font-weight: 600;
}

.actions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.actions-list .btn {
    width: 100%;
    justify-content: center;
    font-weight: normal;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .status-display {
        flex-direction: column;
        gap: 15px;
    }
    
    .controllers-grid,
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .controller-details {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* Animation for status changes */
.status-change {
    animation: statusChange 0.5s ease-in-out;
}

@keyframes statusChange {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Error states */
.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin: 20px 0;
}

/* Notification Messages */
.message-notification {
    padding: 12px 16px;
    margin: 16px 0;
    border-radius: 6px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.message-notification.message-fade-in {
    opacity: 1;
}

.message-notification small {
    opacity: 0.8;
    font-size: 12px;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin: 20px 0;
}

/* Delayed loading overlay */
.delayed-loading-overlay {
    position: absolute;
    top: 10px;
    right: 15px;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.delayed-loading-content {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #666;
}

.loading-spinner-small {
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Position the status section relatively so the overlay can be positioned */
.status-section {
    position: relative;
}

/* First Visit Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.show {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: white;
    border-radius: 15px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: #333;
}

.modal-close:focus {
    outline: none;
    color: #333;
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    text-align: center;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.modal-header .modal-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.modal-body {
    color: #666;
    line-height: 1.6;
    margin-bottom: 25px;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body .highlight {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin: 15px 0;
}

.modal-body .highlight strong {
    color: #2c3e50;
}

.modal-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.modal-actions .btn {
    flex: 1;
    min-width: 120px;
    text-align: center;
}

.modal-actions .btn-dismiss {
    background: #6c757d;
    color: white;
}

.modal-actions .btn-dismiss:hover {
    background: #5a6268;
}

/* Responsive modal */
@media (max-width: 600px) {
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    
    .modal-header h2 {
        font-size: 1.5rem;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions .btn {
        width: 100%;
    }
}