/*!
 * CNTEC Notifications Styles
 * Professional Toast & Modal styles for CNTEC Orçamento Engine
 * 
 * @version 1.0.0
 * @author CNTEC Development Team
 * @since 1.0.0
 */

/* ============================================
   TOAST CONTAINER
   ============================================ */

.cntec-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 400px;
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */

.cntec-toast {
    pointer-events: auto;
    min-width: 300px;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(229, 231, 235, 0.8);
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.cntec-toast.cntec-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.cntec-toast.cntec-toast-dismissing {
    transform: translateX(100%);
    opacity: 0;
    max-height: 0;
    margin: 0;
    padding: 0;
}

/* Toast Content */
.cntec-toast-content {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    position: relative;
}

.cntec-toast-icon {
    flex-shrink: 0;
    margin-top: 1px;
}

.cntec-toast-message {
    flex: 1;
    color: #374151;
    font-weight: 400;
    margin-right: 8px;
}

.cntec-toast-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    color: #9ca3af;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.cntec-toast-close:hover {
    background: rgba(156, 163, 175, 0.1);
    color: #6b7280;
}

/* ============================================
   TOAST TYPES
   ============================================ */

/* Success Toast */
.cntec-toast-success {
    border-left: 4px solid #10b981;
}

.cntec-toast-success .cntec-toast-icon {
    color: #10b981;
}

/* Error Toast */
.cntec-toast-error {
    border-left: 4px solid #ef4444;
}

.cntec-toast-error .cntec-toast-icon {
    color: #ef4444;
}

/* Warning Toast */
.cntec-toast-warning {
    border-left: 4px solid #f59e0b;
}

.cntec-toast-warning .cntec-toast-icon {
    color: #f59e0b;
}

/* Info Toast */
.cntec-toast-info {
    border-left: 4px solid #3b82f6;
}

.cntec-toast-info .cntec-toast-icon {
    color: #3b82f6;
}

/* ============================================
   CONFIRMATION MODAL
   ============================================ */

.cntec-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999998;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 20px;
    box-sizing: border-box;
}

.cntec-confirm-overlay.cntec-confirm-show {
    opacity: 1;
    visibility: visible;
}

.cntec-confirm-modal {
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cntec-confirm-overlay.cntec-confirm-show .cntec-confirm-modal {
    transform: scale(1) translateY(0);
}

/* Modal Header */
.cntec-confirm-header {
    padding: 24px 24px 0 24px;
}

.cntec-confirm-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    line-height: 1.4;
}

/* Modal Body */
.cntec-confirm-body {
    padding: 16px 24px 24px 24px;
}

.cntec-confirm-message {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* Modal Footer */
.cntec-confirm-footer {
    padding: 0 24px 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cntec-confirm-footer button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Cancel Button */
.cntec-confirm-cancel {
    background: #f9fafb;
    color: #374151;
    border: 1px solid #d1d5db !important;
}

.cntec-confirm-cancel:hover {
    background: #e5e7eb;
    border-color: #6b7280 !important;
    color: #1f2937;
}

.cntec-confirm-cancel:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(156, 163, 175, 0.1);
}

/* Confirm Button */
.cntec-confirm-confirm {
    background: #2563eb;
    color: #ffffff;
}

.cntec-confirm-confirm:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.cntec-confirm-confirm:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.cntec-confirm-confirm:active {
    transform: translateY(0);
}

/* Confirm Button Variants */
.cntec-confirm-warning {
    background: #f59e0b;
}

.cntec-confirm-warning:hover {
    background: #d97706;
    box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.cntec-confirm-error {
    background: #ef4444;
}

.cntec-confirm-error:hover {
    background: #dc2626;
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .cntec-toast-container {
        top: 20px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
    
    .cntec-toast {
        min-width: auto;
        max-width: none;
    }
    
    .cntec-confirm-overlay {
        padding: 16px;
    }
    
    .cntec-confirm-modal {
        max-width: none;
        width: 100%;
    }
    
    .cntec-confirm-footer {
        flex-direction: column-reverse;
    }
    
    .cntec-confirm-footer button {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .cntec-toast-container {
        top: 16px;
        right: 12px;
        left: 12px;
    }
    
    .cntec-toast-content {
        padding: 14px;
    }
    
    .cntec-confirm-header,
    .cntec-confirm-body {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .cntec-confirm-footer {
        padding: 0 20px 20px 20px;
    }
}

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

.cntec-toast:focus-within {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.cntec-confirm-modal:focus-within {
    outline: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cntec-toast,
    .cntec-confirm-overlay,
    .cntec-confirm-modal,
    .cntec-toast-close,
    .cntec-confirm-footer button {
        transition: none;
    }
    
    .cntec-toast.cntec-toast-show {
        transform: none;
    }
    
    .cntec-confirm-overlay.cntec-confirm-show .cntec-confirm-modal {
        transform: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    .cntec-toast {
        border: 2px solid;
        background: #ffffff;
    }
    
    .cntec-confirm-modal {
        border: 2px solid #000000;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .cntec-toast-container,
    .cntec-confirm-overlay {
        display: none !important;
    }
}
