/* Domilocus WP Admin Styles - VERSIONE AGGIORNATA 2025-11-17 17:00 */
/* Se non vedi questo commento negli strumenti sviluppatore, hai la cache vecchia */

/* Admin Menu Badge Styling */
#adminmenu .wp-submenu a span[style*="color: #d63638"] {
    display: inline-block;
    padding: 2px 6px;
    background: #fcf0f1;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-left: 5px;
    vertical-align: middle;
}

#adminmenu .wp-submenu li.current a span[style*="color: #d63638"] {
    background: rgba(255, 255, 255, 0.1);
}

/* Plan Features Overview Styling */
.domilocus-plans-overview {
    margin-top: 30px;
}

.domilocus-plans-overview h2 {
    color: #23282d;
    margin-bottom: 20px;
    font-size: 1.3em;
}

.domilocus-plans-table {
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.domilocus-plans-table table {
    margin: 0;
    border: none;
}

.domilocus-plans-table th {
    background-color: #f9f9f9;
    font-weight: 600;
    border-bottom: 1px solid #e1e1e1;
    padding: 12px 8px;
}

.domilocus-plans-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f0f0f1;
    vertical-align: top;
}

.domilocus-plans-table tr:last-child td {
    border-bottom: none;
}

.domilocus-feature-group {
    background-color: #f0f0f1;
    font-weight: bold;
}

.domilocus-feature-enabled {
    color: #00a32a;
    margin-left: 10px;
}

.domilocus-feature-check {
    color: #00a32a;
    font-size: 18px;
    font-weight: bold;
}

.domilocus-feature-not-included {
    color: #ddd;
    font-size: 18px;
}

.domilocus-current-plan {
    background-color: #e7f3ff !important;
}

.domilocus-plan-info {
    margin-top: 20px;
    padding: 15px;
    background: #e7f3ff;
    border-left: 4px solid #0073aa;
    border-radius: 4px;
}

.domilocus-plan-info p {
    margin: 5px 0;
}

.domilocus-upgrade-section {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 4px;
}

.domilocus-upgrade-section .button {
    margin: 0 10px;
}

/* License status styling */
.domilocus-license-status .notice {
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.domilocus-license-status .updated {
    border-left-color: #00a32a;
}

.domilocus-license-status .notice-warning {
    border-left-color: #dba617;
}

.domilocus-license-status .notice-error {
    border-left-color: #d63638;
}

/* Premium placeholder styling */
.domilocus-premium-placeholder {
    text-align: center;
    padding: 60px 40px;
    background: white;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.domilocus-premium-placeholder h2 {
    color: #50575e;
    margin-bottom: 15px;
}

.domilocus-premium-placeholder p {
    color: #646970;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.5;
}

.domilocus-premium-placeholder .button-primary {
    font-size: 16px;
    padding: 10px 20px;
    height: auto;
}

/* Calendar Admin Styling - Modern Card UI */
.domilocus-admin-calendar {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 30px;
    margin: 25px 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    max-width: 100%;
}

.domilocus-admin-calendar h3.calendar-title {
    text-align: center;
    margin: 0;
    color: #1a1f36;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.calendar-container {
    overflow-x: auto;
    overflow-y: visible;
    margin: 0;
    padding: 10px 5px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

.calendar-nav {
    background: #ffffff;
    border: 1px solid #e6e8eb;
    padding: 10px 24px;
    cursor: pointer;
    border-radius: 12px;
    text-decoration: none;
    color: #4f566b;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    min-width: 100px;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.calendar-nav:hover {
    background: #f7f9fc;
    color: #2271b1;
    border-color: #2271b1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.15);
    text-decoration: none;
}

.calendar-grid {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    min-width: 800px;
    max-width: 100%;
    gap: 1px;
    background-color: #f0f2f5; /* Grid lines color */
    box-shadow: 0 0 0 1px #e6e8eb;
}

/* Weekdays header */
.calendar-weekdays {
    display: contents;
}

.calendar-weekday {
    color: #697386;
    padding: 18px 10px;
    text-align: center;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background: #f7f9fc;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Days grid */
.calendar-days {
    display: contents;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    padding: 12px 8px;
    box-sizing: border-box;
}

.calendar-day:hover {
    background: #ffffff;
    z-index: 2;
    box-shadow: inset 0 0 0 2px #2271b1;
}

.calendar-day.empty {
    background: #fcfcfc !important;
    cursor: default;
    opacity: 1;
}

.calendar-day.past {
    background: #fcfcfc;
    color: #a0aec0;
}

.calendar-day.today {
    background: #ffffff;
}

.calendar-day.today .day-number {
    background: #2271b1;
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(34, 113, 177, 0.3);
}

/* Status Colors - Modern Pastels */
.calendar-day.available {
    background: #ffffff;
}

.calendar-day.booked {
    background: #fff5f5;
}

.calendar-day.booked .day-status {
    color: #c53030;
    background: #fed7d7;
}

.calendar-day.blocked {
    background: #fffaf0;
}

.calendar-day.blocked .day-status {
    color: #9c4221;
    background: #feebc8;
}

.calendar-day.maintenance {
    background: #edf2f7;
}

.calendar-day.maintenance .day-status {
    color: #2d3748;
    background: #e2e8f0;
}

.day-number {
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 15px;
    color: #1a1f36;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.day-price {
    font-size: 11px;
    color: #4f566b;
    font-weight: 600;
    text-align: center;
    padding: 2px 8px;
    border-radius: 10px;
    background: #f7f9fc;
    margin-bottom: 4px;
    border: 1px solid #e6e8eb;
}

.day-status {
    font-size: 9px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 4px;
    margin-top: auto;
}

.calendar-day.available .day-status {
    color: #2f855a;
    background: #c6f6d5;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    padding: 24px;
    border-top: 1px solid #e6e8eb;
    font-size: 13px;
    justify-content: center;
    background: #ffffff;
    margin: 0 -30px -30px -30px;
    border-radius: 0 0 16px 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #4f566b;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e6e8eb;
}

.legend-color.available { background: #48bb78; border-color: #48bb78; }
.legend-color.booked { background: #f56565; border-color: #f56565; }
.legend-color.blocked { background: #ed8936; border-color: #ed8936; }
.legend-color.maintenance { background: #a0aec0; border-color: #a0aec0; }
.legend-color.today { background: #4299e1; border-color: #4299e1; }

/* Modal Styling */
.day-details-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    backdrop-filter: blur(2px);
    background-color: rgba(26, 31, 54, 0.4);
    padding: 40px 20px;
    box-sizing: border-box;
}

.day-details-content {
    position: relative;
    background-color: #fff;
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    padding: 32px;
    margin: 40px auto;
    max-width: 520px;
    width: 100%;
}

.day-details-close {
    color: #a0aec0;
    transition: color 0.2s;
    top: 20px;
    right: 20px;
    position: absolute;
}

.day-details-close:hover {
    color: #1a1f36;
}

.form-field label {
    color: #4f566b;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.form-field input,
.form-field select,
.form-field textarea {
    border: 1px solid #e6e8eb;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    color: #1a1f36;
    transition: all 0.2s;
    background: #f7f9fc;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    background: #fff;
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.1);
}

.button-group .button {
    border-radius: 6px;
    padding: 6px 16px;
    height: auto;
    font-weight: 500;
}

.button-group .button-primary {
    background: #2271b1;
    border-color: #2271b1;
    box-shadow: 0 2px 5px rgba(34, 113, 177, 0.2);
}

.button-group .button-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
}

/* Loading state */
.calendar-loading {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

.calendar-loading::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

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

/* Settings form field sizing */
.domilocus-settings .form-table input[type="number"],
.domilocus-settings .form-table input[type="text"],
.domilocus-settings .form-table input[type="password"],
.domilocus-settings .form-table select {
    width: 220px;
    max-width: 100%;
}

.domilocus-settings .form-table input[type="number"],
.domilocus-settings .form-table input.small-text {
    width: 90px;
}

.domilocus-settings .form-table input.regular-text {
    width: 280px;
    max-width: 100%;
}

.domilocus-settings .form-table textarea {
    width: 320px;
    max-width: 100%;
    min-height: 90px;
}

/* Responsive design */
@media (min-width: 1200px) {
    .calendar-day {
        max-height: 100px;
    }
}

@media (max-width: 782px) {
    /* Plan features responsive */
    .domilocus-plans-table {
        overflow-x: auto;
    }
    
    .domilocus-plans-table table {
        min-width: 600px;
    }
    
    .domilocus-plans-table th,
    .domilocus-plans-table td {
        padding: 8px 4px;
        font-size: 12px;
    }
    
    /* Calendar responsive */
    .domilocus-admin-calendar {
        padding: 15px;
    }
    
    .calendar-day {
        min-height: 80px;
        font-size: 12px;
        padding: 4px 2px;
    }
    
    .day-number {
        font-size: 14px;
    }
    
    .day-price {
        font-size: 10px;
    }
    
    .calendar-nav {
        min-width: 80px;
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .calendar-title {
        font-size: 18px !important;
    }
    
    .calendar-legend {
        gap: 15px;
    }
    
    .legend-item {
        font-size: 12px;
    }
    
    .day-details-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }
    
    .control-group {
        flex-direction: column;
        align-items: stretch;
    }
}

/* Week View Styles */
.domilocus-admin-calendar.week-view {
    max-width: 100%;
}

.calendar-week-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.calendar-week-grid .calendar-day {
    min-height: 200px;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.calendar-week-grid .calendar-day.today {
    border-color: #2271b1;
    box-shadow: 0 0 10px rgba(34, 113, 177, 0.3);
}

.calendar-week-grid .calendar-day.booked {
    background-color: #ffebee;
    border-color: #ef5350;
}

.calendar-week-grid .calendar-day.available {
    background-color: #f1f8f4;
    border-color: #46b450;
}

.calendar-week-grid .calendar-day.past {
    background-color: #f9f9f9;
    opacity: 0.6;
}

.calendar-week-grid .day-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.calendar-week-grid .day-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
}

.calendar-week-grid .day-number {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #23282d;
    margin-top: 5px;
}

.calendar-week-grid .day-booking {
    font-size: 13px;
    line-height: 1.6;
}

.calendar-week-grid .day-booking strong {
    color: #d63638;
    font-size: 14px;
}

.calendar-week-grid .day-empty {
    color: #46b450;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* Day View Styles */
.domilocus-admin-calendar.day-view {
    max-width: 900px;
    margin: 0 auto;
}

.calendar-day-view {
    margin-top: 30px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 30px;
}

.calendar-day-view .day-info h3 {
    font-size: 24px;
    color: #23282d;
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid #2271b1;
}

.calendar-day-view .booking-details {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.calendar-day-view .booking-details h4 {
    font-size: 18px;
    color: #2271b1;
    margin: 0 0 15px 0;
}

.calendar-day-view .booking-details p {
    margin: 10px 0;
    font-size: 15px;
    line-height: 1.6;
}

.calendar-day-view .booking-details strong {
    display: inline-block;
    min-width: 140px;
    color: #23282d;
}

.calendar-day-view .no-booking {
    text-align: center;
    padding: 60px 20px;
    background: #f1f8f4;
    border-radius: 6px;
    border: 2px dashed #46b450;
}

.calendar-day-view .no-booking p {
    font-size: 16px;
    color: #666;
    margin: 15px 0;
}

.calendar-day-view .button-primary {
    margin-top: 15px;
    padding: 12px 24px;
    font-size: 15px;
}

/* Responsive for week/day views */
@media (max-width: 1200px) {
    .calendar-week-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 782px) {
    .calendar-week-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .calendar-week-grid .calendar-day {
        min-height: 150px;
        padding: 10px;
    }
    
    .calendar-week-grid .day-number {
        font-size: 16px;
    }
    
    .calendar-day-view {
        padding: 20px 15px;
    }
    
    .calendar-day-view .day-info h3 {
        font-size: 20px;
    }
    
    .calendar-day-view .booking-details {
        padding: 15px;
    }
    
    .calendar-day-view .booking-details strong {
        display: block;
        margin-bottom: 5px;
    }
}

@media (max-width: 600px) {
    .calendar-week-grid {
        grid-template-columns: 1fr;
    }
}