/* Custom CSS for Cluster Monitoring */

/* Sticky footer layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
}

main {
    flex: 1;
    width: 100%;
}

footer {
    margin-top: auto;
    flex-shrink: 0;
}

/* Tab styling */
.tab-button {
    transition: all 0.2s ease-in-out;
}

.tab-button:hover {
    transform: translateY(-1px);
}

.tab-button.active {
    transform: translateY(-1px);
}

/* Tab content transitions */
.tab-content {
    transition: opacity 0.3s ease-in-out;
}

.tab-content.hidden {
    opacity: 0;
    pointer-events: none;
}

.tab-content.active {
    opacity: 1;
    pointer-events: all;
}

/* Sensor card hover effects */
.sensor-card {
    transition: all 0.3s ease-in-out;
}

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

/* Settings page specific styles */
.settings-container {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Language switcher styling */
.lang-btn {
    transition: all 0.2s ease-in-out;
    min-width: 44px;
    min-height: 44px;
}

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

.lang-btn.active {
    background-color: #dbeafe !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Modern toggle switch styling */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #3b82f6;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #3b82f6;
}

input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

/* Input focus effects */
.sensor-setting:focus,
.email-setting:focus {
    transform: scale(1.02);
}

/* Card hover animations */
.settings-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.settings-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Status badge animations */
.status-badge {
    animation: pulse 2s infinite;
}

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

/* Responsive grid adjustments */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .sensor-settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .sensor-settings-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Loading states */
.loading-spinner {
    animation: spin 1s linear infinite;
}

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

/* Success/error message animations */
.message-slide-in {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}
