/* Custom styles for Main Gate Control */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.gate-status-container {
    padding: 2rem 0;
}

.gate-icon-wrapper {
    position: relative;
    display: inline-block;
}

.gate-icon {
    font-size: 8rem;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* Gate state specific styles */
.gate-locked .gate-icon {
    color: #dc3545;
}

.gate-closed .gate-icon {
    color: #6c757d;
}

.gate-moving .gate-icon {
    color: #ffc107;
    animation: pulse 1s infinite;
}

.gate-open .gate-icon {
    color: #28a745;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Badge colors for different states */
.badge.state-locked {
    background-color: #dc3545 !important;
}

.badge.state-closed {
    background-color: #6c757d !important;
}

.badge.state-moving {
    background-color: #ffc107 !important;
    color: #000;
}

.badge.state-open {
    background-color: #28a745 !important;
}

/* Activity log styles */
#activity-log {
    max-height: 300px;
    overflow-y: auto;
}

#activity-log .list-group-item {
    font-size: 0.9rem;
}

#activity-log .timestamp {
    font-size: 0.8rem;
    color: #6c757d;
}

/* Button loading state */
.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 576px) {
    .gate-icon {
        font-size: 5rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
}

/* Connection status animations */
.alert {
    transition: all 0.3s ease;
}

/* Card shadow effect */
.card {
    border: none;
    border-radius: 15px;
}

.card-header {
    border-top-left-radius: 15px !important;
    border-top-right-radius: 15px !important;
}
