.uptime-monitor-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    box-sizing: border-box;
}

.uptime-monitor-container canvas {
    display: block;
    width: 100% !important;
    height: auto !important;
    min-height: 250px; 
}

.uptime-monitor-user-interaction {
    text-align: center;
    margin-top: 20px;
}

.uptime-btn {
    background-color: #0073aa;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.uptime-btn:hover {
    background-color: #005177;
}

.uptime-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

.uptime-monitor-msg {
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
}

.uptime-monitor-container .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none; 
}

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

@media (max-width: 768px) {
    .uptime-monitor-container {
        padding: 15px;
        margin: 15px auto;
    }
    .uptime-btn {
        width: 100%;
        margin: 5px 0;
    }
}

/* assets/css/uptime-monitor-frontend.css */

/* Contenitore principale dello shortcode */
.uptime-monitor-container {
    position: relative;
    width: 100%; /* Occupa tutta la larghezza disponibile */
    max-width: 900px; /* Limita la larghezza massima del contenitore */
    margin: 20px auto; /* Centra il contenitore e aggiunge margine */
    padding: 20px;
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    box-sizing: border-box; /* Include padding e border nella larghezza */
}

/* Regole per il canvas del grafico */
.uptime-monitor-container canvas.uptimeChart { /* Aumentata specificità */
    display: block;
    width: 100% !important; /* Forza la larghezza al 100% del contenitore */
    height: auto !important; /* Mantieni l'aspect ratio */
    min-height: 250px; /* Altezza minima per leggibilità su schermi piccoli */
    max-height: 500px; /* Altezza massima per evitare che diventi troppo alto su schermi grandi */
}

/* Interazione utente (pulsanti e messaggio) */
.uptime-monitor-user-interaction {
    text-align: center;
    margin-top: 20px;
}

.uptime-btn {
    background-color: #0073aa; /* Blu WordPress */
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 0 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Leggera ombra */
}

.uptime-btn:hover {
    background-color: #005177; /* Blu più scuro al hover */
}

.uptime-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.uptime-monitor-msg {
    margin-bottom: 15px;
    font-weight: bold;
    color: #333;
    min-height: 20px; /* Per evitare salti di layout */
}

/* Loader semplice per l'AJAX */
.uptime-monitor-container .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db; /* Colore del loader */
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: none; /* Inizialmente nascosto, mostrato con JS */
}

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

/* Media Queries per la responsività */
@media (max-width: 768px) {
    .uptime-monitor-container {
        padding: 15px;
        margin: 15px auto;
    }
    .uptime-btn {
        width: calc(100% - 10px); /* Larghezza piena con margine */
        margin: 5px 0;
    }
}

@media (max-width: 480px) {
    .uptime-monitor-container {
        padding: 10px;
        margin: 10px auto;
    }
    .uptime-btn {
        font-size: 14px;
        padding: 8px 15px;
    }
}