/* Custom styles for PHOTON IoT Platform */

.jumbotron {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
}

.card {
    transition: transform 0.2s ease-in-out;
    border: 1px solid #dee2e6;
}

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

.navbar-brand {
    font-weight: bold;
}

.table code {
    background-color: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

pre code {
    font-size: 0.85rem;
    line-height: 1.4;
}

.badge {
    font-size: 0.75rem;
}

/* Custom scrollbar for code blocks */
pre {
    max-height: 300px;
    overflow-y: auto;
}

pre::-webkit-scrollbar {
    width: 6px;
}

pre::-webkit-scrollbar-track {
    background: #f1f1f1;
}

pre::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

pre::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Device status indicators */
.device-status-online {
    color: #28a745;
}

.device-status-offline {
    color: #6c757d;
}

.device-status-warning {
    color: #ffc107;
}

/* Animation for refresh button */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

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

/* Responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }

    .jumbotron {
        padding: 2rem 1rem !important;
    }

    .jumbotron h1 {
        font-size: 2rem;
    }
}

/* Footer styles */
footer {
    margin-top: auto;
}

/* Custom button styles */
.btn-copy:hover {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
    color: white !important;
}

/* Form improvements */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Alert improvements */
.alert {
    border-radius: 0.375rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

/* Modal improvements */
.modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Pagination */
.pagination .page-link {
    color: #007bff;
}

.pagination .page-item.active .page-link {
    background-color: #007bff;
    border-color: #007bff;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Status badges */
.status-badge {
    font-size: 0.75rem;
    padding: 0.25em 0.6em;
}

/* Device cards */
.device-card {
    transition: all 0.3s ease;
    cursor: pointer;
}

.device-card:hover {
    border-color: #007bff;
    box-shadow: 0 0 0 0.1rem rgba(0, 123, 255, 0.25);
}
