/* 
   CSS para o editor de data de manutenção
   Sistema Stay Orlando - Edição de Data via Interface
*/

.maintenance-date-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    position: relative;
}

.maintenance-date-text {
    display: inline;
}

.maintenance-date-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #3b82f6;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    border: none;
    outline: none;
}

.maintenance-date-icon:hover {
    background: #2563eb;
    transform: scale(1.1);
}

.maintenance-date-icon:active {
    transform: scale(0.95);
}

/* Date picker modal */
.date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.date-picker-content {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.date-picker-header {
    margin-bottom: 20px;
    text-align: center;
}

.date-picker-title {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.date-picker-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.date-picker-input-group {
    margin-bottom: 20px;
}

.date-picker-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.date-picker-input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.date-picker-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-picker-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.date-picker-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.date-picker-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.date-picker-btn-cancel:hover {
    background: #e5e7eb;
}

.date-picker-btn-save {
    background: #3b82f6;
    color: white;
}

.date-picker-btn-save:hover {
    background: #2563eb;
}

.date-picker-btn-save:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Loading state */
.date-picker-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #6b7280;
}

.date-picker-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success/Error messages */
.date-picker-message {
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
    text-align: center;
}

.date-picker-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.date-picker-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* Responsividade mobile */
@media (max-width: 640px) {
    .date-picker-content {
        padding: 20px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .date-picker-actions {
        flex-direction: column;
    }
    
    .date-picker-btn {
        width: 100%;
    }
}

/* Hide on print */
@media print {
    .maintenance-date-icon {
        display: none !important;
    }
}

