/**
* Digital Hospitality - Stili Modal Dettaglio Prenotazione (v10.0.7.22)
*/

.dh-modal-overlay {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(0, 0, 0, 0.6);
   z-index: 99999;
   display: flex;
   justify-content: center;
   align-items: flex-start;
   padding: 40px 20px;
   overflow-y: auto;
   backdrop-filter: blur(4px);
   animation: dh-modal-fade-in 0.25s ease-out;
}

@keyframes dh-modal-fade-in {
   from { opacity: 0; }
   to { opacity: 1; }
}

.dh-modal-container {
   background: #fff;
   border-radius: 12px;
   width: 100%;
   max-width: 720px;
   box-shadow: 0 20px 60px rgba(0,0,0,0.4);
   animation: dh-modal-slide-up 0.3s ease-out;
}

@keyframes dh-modal-slide-up {
   from { transform: translateY(20px); opacity: 0; }
   to { transform: translateY(0); opacity: 1; }
}

.dh-modal-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   padding: 20px 24px;
   border-bottom: 1px solid #e0e0e0;
   background: linear-gradient(135deg, #2271b1 0%, #135e96 100%);
   color: #fff;
   border-radius: 12px 12px 0 0;
}
.dh-modal-header h2 {
   margin: 0;
   color: #fff;
   font-size: 20px;
   font-weight: 700;
}
.dh-modal-close {
   background: rgba(255,255,255,0.2);
   border: none;
   color: #fff;
   width: 32px;
   height: 32px;
   border-radius: 50%;
   cursor: pointer;
   font-size: 16px;
   font-weight: bold;
   transition: background 0.2s;
}
.dh-modal-close:hover {
   background: rgba(255,255,255,0.4);
}

.dh-modal-body {
   padding: 24px;
   max-height: calc(100vh - 200px);
   overflow-y: auto;
}

.dh-modal-loading {
   text-align: center;
   padding: 60px 20px;
   color: #666;
   font-size: 14px;
}

/* Sezioni del modal */
.dh-modal-section {
   margin-bottom: 24px;
   padding-bottom: 20px;
   border-bottom: 1px solid #f0f0f0;
}
.dh-modal-section:last-child {
   border-bottom: none;
   margin-bottom: 0;
}
.dh-modal-section-title {
   font-size: 12px;
   text-transform: uppercase;
   letter-spacing: 0.8px;
   color: #888;
   font-weight: 700;
   margin-bottom: 12px;
}

/* Campi modifica */
.dh-modal-grid {
   display: grid;
   grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
   gap: 16px;
}
.dh-modal-field label {
   display: block;
   font-size: 12px;
   font-weight: 700;
   color: #555;
   margin-bottom: 4px;
}
.dh-modal-field input,
.dh-modal-field select,
.dh-modal-field textarea {
   width: 100%;
   padding: 8px 10px;
   border: 1px solid #d0d0d0;
   border-radius: 4px;
   font-size: 14px;
   box-sizing: border-box;
}
.dh-modal-field textarea {
   min-height: 60px;
   resize: vertical;
}

/* Status badge */
.dh-modal-status {
   display: inline-block;
   padding: 4px 12px;
   border-radius: 20px;
   font-size: 12px;
   font-weight: 700;
}
.dh-modal-status.status-pending   { background: #fff3cd; color: #856404; }
.dh-modal-status.status-confirmed { background: #d4edda; color: #155724; }
.dh-modal-status.status-rejected  { background: #f8d7da; color: #721c24; }

/* Tavolo info card */
.dh-modal-table-card {
   background: #f0f6fc;
   border: 1px solid #c3d4e9;
   border-radius: 8px;
   padding: 12px 16px;
   display: flex;
   justify-content: space-between;
   align-items: center;
   margin-bottom: 12px;
}
.dh-modal-table-card-info strong {
   font-size: 16px;
   color: #2271b1;
}
.dh-modal-table-card-info small {
   display: block;
   color: #666;
   font-size: 12px;
   margin-top: 2px;
}

/* Lista tavoli disponibili */
.dh-table-list {
   display: grid;
   grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
   gap: 8px;
   margin-top: 10px;
}
.dh-table-option {
   background: #fff;
   border: 2px solid #e0e0e0;
   border-radius: 6px;
   padding: 10px;
   text-align: center;
   cursor: pointer;
   transition: all 0.2s;
}
.dh-table-option:hover:not(.is-busy):not(.no-fit) {
   border-color: #2271b1;
   background: #f0f6fc;
}
.dh-table-option.is-selected {
   border-color: #10ac84;
   background: #d4edda;
}
.dh-table-option.is-busy {
   opacity: 0.4;
   cursor: not-allowed;
   background: #f8d7da;
}
.dh-table-option.no-fit {
   opacity: 0.5;
   cursor: not-allowed;
   background: #fff3cd;
}
.dh-table-option-num {
   font-size: 18px;
   font-weight: 800;
   color: #1d2327;
}
.dh-table-option-info {
   font-size: 11px;
   color: #666;
   margin-top: 4px;
}

/* Azioni rapide */
.dh-modal-actions {
   display: flex;
   gap: 8px;
   flex-wrap: wrap;
   margin-top: 12px;
}
.dh-modal-action-btn {
   flex: 1;
   min-width: 140px;
   padding: 10px 16px;
   border: none;
   border-radius: 6px;
   font-weight: 700;
   cursor: pointer;
   text-align: center;
   text-decoration: none;
   transition: all 0.2s;
   font-size: 13px;
   display: inline-block;
}
.dh-action-call    { background: #4caf50; color: #fff; }
.dh-action-whatsapp { background: #25d366; color: #fff; }
.dh-action-email   { background: #2196f3; color: #fff; }
.dh-action-confirm { background: #10ac84; color: #fff; }
.dh-action-reject  { background: #dc3545; color: #fff; }
.dh-action-save    { background: #2271b1; color: #fff; }
.dh-modal-action-btn:hover {
   transform: translateY(-1px);
   box-shadow: 0 4px 8px rgba(0,0,0,0.15);
   color: #fff;
}

.dh-modal-meta {
   font-size: 12px;
   color: #888;
   margin-top: 4px;
}
.dh-modal-meta-row {
   display: flex;
   gap: 16px;
   flex-wrap: wrap;
}