/**
 * HUMUS SCHEDULER - Frontend CSS SOBRIO
 * Overlay integrato e minimale
 */

/* ===================================
   OVERLAY SOBRIO PRINCIPALE
   =================================== */

.humus-closure-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.humus-closure-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ===================================
   CONTENUTO SOBRIO
   =================================== */

.closure-content {
    background: transparent;
    padding: 40px 20px;
    text-align: center;
    max-width: 600px;
    width: 90%;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.humus-closure-overlay.active .closure-content {
    transform: translateY(0);
}

/* ===================================
   TIPOGRAFIA SOBRIA
   =================================== */

.closure-title {
    color: #ff6b35;
    margin-bottom: 15px;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.closure-message {
    color: #666;
    font-size: 18px;
    margin-bottom: 20px;
    line-height: 1.5;
    font-weight: 400;
}

.next-opening-info {
    color: #ff6b35;
    font-size: 16px;
    margin-bottom: 25px;
    padding: 12px 20px;
    background: rgba(255, 107, 53, 0.1);
    border-radius: 8px;
    border-left: 3px solid #ff6b35;
    font-weight: 500;
}

.closure-reason {
    color: #999;
    font-style: italic;
    margin-bottom: 20px;
    font-size: 15px;
}

/* ===================================
   AZIONI - SOLO TESTO
   =================================== */

.closure-actions {
    margin-top: 35px;
    display: flex;
    flex-direction: column;
    gap: 0; /* No gap, usiamo margin nel button */
    justify-content: center;
    align-items: center;
}

/* 📅 LINK CALENDARIO - SOLO TESTO ARANCIONE */
.calendar-link {
    color: black !important;
    font-size: 16px;
    text-decoration: underline;
    font-weight: 700;
    transition: all 0.2s ease;
    cursor: pointer;
}

.calendar-link:hover {
    color: #ff6b35 !important; /* Arancione Humus */
}

/* LINK HOME - STILE BOTTONE SITO */
.closure-actions .button {
  display: block;
  align-items: center; 
  justify-content: center;
  padding: 12px 24px;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  font-size: 16px;
  text-transform: uppercase;
  text-decoration: none;
  width: fit-content;
  margin: 30px auto;
  text-align: center;
  font-family: Helvetica, Arial, sans-serif;
  font-weight: bold;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 24px;
  background-color: #ff7000;
  color: white;
  border-radius: 10px; /* Bordi arrotondati */
  border: 3px solid #ff7000;
  box-shadow: none;
  text-shadow: none !important;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
}

.closure-actions .button:hover {
  background-color: #fff;
  color: #ff7000;
  border: 3px solid #ff7000;
  border-radius: 10px; /* Arrotondati anche in hover */

}

/* ===================================
   TIMER SOBRIO (se presente)
   =================================== */

.closure-timer {
    margin-top: 20px;
    padding: 12px 20px;
    background: rgba(255, 107, 53, 0.05);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.2);
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    font-family: 'Monaco', 'Menlo', monospace;
    letter-spacing: 0.5px;
}

/* ===================================
   NOTIFICHE SOBRIE
   =================================== */

.humus-reopening-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ff6b35;
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
    z-index: 999998;
    opacity: 0;
    transform: translateX(100%) scale(0.95);
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 15px;
}

.humus-reopening-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.notification-icon {
    font-size: 18px;
}

/* ===================================
   MESSAGGIO TEMPORANEO SOBRIO
   =================================== */

.humus-temp-message {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(60px);
    background: rgba(255, 107, 53, 0.95);
    color: white;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    z-index: 999997;
    opacity: 0;
    transition: all 0.3s ease;
    max-width: 90%;
    text-align: center;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.humus-temp-message.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ===================================
   WIDGET STATO SOBRIO
   =================================== */

.humus-shop-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
}

.status-indicator.open {
    color: #27ae60;
}

.status-indicator.closed {
    color: #ff6b35;
}

.hours {
    color: #666;
    font-size: 13px;
}

.next-opening {
    color: #ff6b35;
    font-size: 13px;
}

/* ===================================
   RESPONSIVE SOBRIO
   =================================== */

@media (max-width: 768px) {
    .closure-content {
        padding: 30px 15px;
    }
    
    .closure-icon {
        font-size: 40px;
        margin-bottom: 15px;
    }
    
    .closure-title {
        font-size: 24px;
        margin-bottom: 12px;
    }
    
    .closure-message {
        font-size: 16px;
        margin-bottom: 18px;
    }
    
    .next-opening-info {
        font-size: 15px;
        padding: 10px 15px;
    }
    
    /* Link calendario/home responsive */
    .calendar-link {
        font-size: 17px;
    }
    
    /* Button Home mantiene lo stesso stile anche su mobile */
    .closure-actions .button {
        font-size: 14px;
        padding: 12px 24px;
    }
    
    .humus-reopening-notification {
        top: 15px;
        right: 15px;
        left: 15px;
        text-align: center;
    }
    
    .humus-temp-message {
        bottom: 15px;
        left: 15px;
        right: 15px;
        transform: translateY(60px);
        max-width: none;
    }
    
    .humus-temp-message.show {
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .closure-content {
        padding: 25px 10px;
    }
    
    .closure-icon {
        font-size: 36px;
    }
    
    .closure-title {
        font-size: 22px;
    }
    
    .closure-message {
        font-size: 15px;
    }
    
    .calendar-link {
        font-size: 16px;
    }
    
    /* Button Home stesso stile anche su mobile piccolo */
    .closure-actions .button {
        font-size: 14px;
        padding: 12px 20px; /* Leggermente meno padding sui lati */
    }
}

/* ===================================
   ACCESSIBILITY SOBRIO
   =================================== */

@media (prefers-reduced-motion: reduce) {
    .humus-closure-overlay,
    .closure-content,
    .humus-reopening-notification,
    .humus-temp-message,
    .calendar-link,
    .closure-actions .button {
        transition: opacity 0.2s ease;
    }
    
    .closure-icon {
        animation: none;
    }
}

/* ===================================
   UTILITIES SOBRIE
   =================================== */

.hide-when-closed {
    transition: opacity 0.3s ease;
}

.humus-closure-overlay.active ~ * .hide-when-closed {
    opacity: 0.3;
    pointer-events: none;
}

.highlight-when-open {
    transition: all 0.3s ease;
}

.highlight-when-open.shop-open {
    box-shadow: 0 0 0 2px #27ae60;
    border-radius: 4px;
}

/* ===================================
   PRINT FRIENDLY
   =================================== */

@media print {
    .humus-closure-overlay,
    .humus-reopening-notification,
    .humus-temp-message {
        display: none !important;
    }
}

/* ===================================
   DARK MODE SUPPORT
   =================================== */

@media (prefers-color-scheme: dark) {
    .humus-closure-overlay {
        background: rgba(30, 30, 30, 0.85);
    }
    
    .closure-title {
        color: #ff8c5a;
    }
    
    .closure-message {
        color: #ccc;
    }
    
    .next-opening-info {
        color: #ff8c5a;
        background: rgba(255, 140, 90, 0.1);
        border-left-color: #ff8c5a;
    }
    
    .closure-timer {
        background: rgba(255, 140, 90, 0.1);
        color: #ff8c5a;
        border-color: rgba(255, 140, 90, 0.3);
    }
    
    /* Dark mode per link - SOLO TESTO */
    .calendar-link {
        color: #ff8c5a !important;
    }
    
    .calendar-link:hover {
        color: #ff7043 !important;
    }
    
    /* Button Home mantiene lo stesso stile anche in dark mode */
    .closure-actions .button {
        background-color: #ff7000;
        border-color: #ff7000;
        color: white !important;
    }
    
      .closure-actions .button:hover,
  .closure-actions .button:active,
  .closure-actions .button:focus {
    color: #ff7000 !important;
    -webkit-text-fill-color: #ff7000 !important;
  }
  
}

/* ===================================
   VARIABILI CSS PERSONALIZZABILI
   =================================== */

:root {
    --humus-primary-color: #ff6b35;
    --humus-primary-hover: #e55a2b;
    --humus-text-color: #666;
    --humus-overlay-bg: rgba(255, 255, 255, 0.6);
    --humus-border-radius: 6px;
}

@media (prefers-color-scheme: dark) {
    :root {
        --humus-primary-color: #ff8c5a;
        --humus-primary-hover: #ff7043;
        --humus-text-color: #ccc;
        --humus-overlay-bg: rgba(30, 30, 30, 0.85);
    }
}

.humus-closure-overlay {
    background: var(--humus-overlay-bg);
}

.closure-title,
.next-opening-info {
    color: var(--humus-primary-color);
}

.closure-message {
    color: var(--humus-text-color);
}