/* Estilos generales */
.do-calendar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    max-width: 100%;
    margin: 20px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.do-calendar-header {
    margin-bottom: 20px;
}

.do-calendar-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.5em;
    text-align: center;
}

.do-edit-notice {
    color: #28a745;
    font-weight: 600;
    margin: 10px 0 0 0;
    text-align: center;
    padding: 8px;
    background: #e8f5e9;
    border-radius: 4px;
    border-left: 4px solid #28a745;
}

.do-edit-notice .dashicons {
    vertical-align: middle;
    margin-right: 5px;
}

/* Navegación */
.do-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.do-nav-btn {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 600;
    border: none;
    cursor: pointer;
}

.do-nav-btn:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    color: white;
    text-decoration: none;
}

.do-nav-btn.disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.do-nav-btn.disabled:hover {
    transform: none;
    box-shadow: none;
    background: #cccccc;
}

.do-nav-text {
    margin: 0 8px;
}

.do-current-period {
    flex-grow: 1;
    text-align: center;
}

/* View switcher */
.do-view-switcher {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.do-view-btn {
    padding: 5px 15px;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9em;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.do-view-btn:hover {
    background: #dee2e6;
    text-decoration: none;
}

.do-view-btn.active {
    background: #0073aa;
    color: white;
}

/* Monthly calendar */
.do-monthly-calendar {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.do-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #495057;
    color: white;
    font-weight: 600;
    text-align: center;
}

.do-weekdays > div {
    padding: 12px 5px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.do-weekdays > div:last-child {
    border-right: none;
}

.do-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #dee2e6;
}

.do-day {
    min-height: 100px;
    background: white;
    padding: 8px;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.do-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.do-day.do-editable {
    cursor: pointer;
}

.do-day.do-editable:hover {
    background: #f8f9fa;
}

.do-today {
    border: 2px solid #ffc107 !important;
}

.do-day-number {
    font-size: 1.2em;
    font-weight: bold;
    color: #495057;
    align-self: flex-start;
}

.do-day-status {
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e9ecef;
    color: #495057;
    align-self: flex-start;
}

.do-day-status .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Day statuses */
.do-day-available {
    background: white;
}

.do-day-available .do-day-status {
    background: #28a745;
    color: white;
}

.do-day-booked {
    background: #f8d7da !important;
}

.do-day-booked .do-day-status {
    background: #dc3545;
    color: white;
}

.do-day-empty {
    min-height: 100px;
    background: #f8f9fa;
}

/* Annual calendar */
.do-annual-calendar {
    background: white;
    border-radius: 6px;
    overflow: auto;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.do-annual-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.do-annual-table th,
.do-annual-table td {
    border: 1px solid #dee2e6;
    text-align: center;
    vertical-align: middle;
    padding: 8px 4px;
}

.do-annual-table th {
    background: #495057;
    color: white;
    font-weight: 600;
    padding: 12px 4px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.do-month-header {
    background: #6c757d !important;
    min-width: 80px;
    position: sticky;
    left: 0;
    z-index: 20;
}

.do-day-header {
    min-width: 40px;
    background: #495057;
    font-weight: 600;
}

.do-month-name-cell {
    background: #e9ecef;
    font-weight: bold;
    min-width: 80px;
    position: sticky;
    left: 0;
    z-index: 5;
}

.do-day-empty-cell {
    background: #f8f9fa;
    color: #adb5bd;
    font-weight: bold;
    min-width: 40px;
}

.do-annual-day {
    height: 40px;
    min-width: 40px;
    position: relative;
    transition: all 0.2s ease;
    cursor: default;
}

.do-annual-day.do-editable {
    cursor: pointer;
}

.do-annual-day:hover {
    transform: scale(1.05);
    z-index: 1;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

.do-annual-day .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: block;
    margin: 0 auto;
}

.do-annual-day.do-day-available {
    background: white;
}

.do-annual-day.do-day-available .dashicons {
    color: #28a745;
}

.do-annual-day.do-day-booked {
    background: #f8d7da;
}

.do-annual-day.do-day-booked .dashicons {
    color: #dc3545;
}

.do-annual-day.do-today {
    border: 2px solid #ffc107 !important;
}

/* Legend */
.do-legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.do-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.do-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 3px;
}

.do-legend-available {
    background: white;
    border: 1px solid #dee2e6;
}

.do-legend-booked {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
}

.do-legend-today {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
}

/* Loading and error states */
.do-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.do-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-top-color: transparent;
    border-radius: 50%;
    animation: do-spin 1s linear infinite;
}

@keyframes do-spin {
    to { transform: rotate(360deg); }
}

.do-error {
    color: #dc3545;
    padding: 15px;
    background: #f8d7da;
    border-radius: 4px;
    border-left: 4px solid #dc3545;
    text-align: center;
}

/* Year info */
.do-year-info {
    margin-top: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9em;
    color: #6c757d;
    border-left: 3px solid #0073aa;
}

.do-year-info p {
    margin: 0;
}

/* Navigation disabled state improvements */
.do-nav-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Monthly calendar improvements */
.do-day.do-today {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
}

/* Annual calendar improvements */
.do-annual-day.do-today {
    background-color: #fff3cd !important;
    border: 2px solid #ffc107 !important;
}

/* Better hover effects for annual view */
.do-annual-day:hover {
    position: relative;
    z-index: 100;
}

/* Basic hover effects for all days */
.do-day:not(.do-day-empty):hover,
.do-annual-day:not(.do-day-empty-cell):hover {
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2) !important;
}

/* Responsive improvements for annual table */
@media (max-width: 768px) {
    .do-year-info {
        font-size: 0.8em;
        padding: 8px;
    }
    
    .do-annual-table th.do-day-header,
    .do-annual-table td.do-day-empty-cell,
    .do-annual-table td.do-annual-day {
        min-width: 25px;
        padding: 2px;
    }
    
    .do-annual-day .dashicons {
        font-size: 12px;
        width: 12px;
        height: 12px;
    }
    
    .do-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .do-day-number {
        font-size: 1em;
    }
    
    .do-day-status {
        font-size: 0.75em;
        padding: 1px 4px;
    }
}

@media (max-width: 480px) {
    .do-calendar-wrapper {
        padding: 10px;
    }
    
    .do-day {
        min-height: 70px;
    }
    
    .do-day-status {
        font-size: 0.7em;
        flex-direction: column;
        gap: 2px;
    }
    
    .do-day-status .dashicons {
        display: none;
    }
    
    .do-legend {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .do-annual-table {
        min-width: 600px;
    }
    
    .do-annual-day {
        height: 25px;
        min-width: 25px;
    }
}