/**
 * POS Frontend - Notification & Confirmation Styles
 * 
 * Toast notifications and styled confirmation dialogs
 *
 * @package Anshuk_Helper
 * @since 1.0.0
 */

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.ansk-pos-notifications {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 90%;
    width: 380px;
}

.ansk-pos-toast {
    padding: 14px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: auto;
    animation: anskToastSlideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
}

.ansk-pos-toast.removing {
    animation: anskToastSlideOut 0.3s ease-in forwards;
}

/* Toast Types */
.ansk-pos-toast-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: #fff;
}

.ansk-pos-toast-error {
    background: linear-gradient(135deg, #dc3545 0%, #ff6b6b 100%);
    color: #fff;
}

.ansk-pos-toast-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffca2c 100%);
    color: #212529;
}

.ansk-pos-toast-info {
    background: linear-gradient(135deg, #282c3f 0%, #3d4152 100%);
    color: #fff;
}

/* Toast Elements */
.ansk-pos-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ansk-pos-toast-icon svg {
    width: 20px;
    height: 20px;
}

.ansk-pos-toast-content {
    flex: 1;
}

.ansk-pos-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    opacity: 0.7;
    color: inherit;
    transition: opacity 0.2s;
}

.ansk-pos-toast-close:hover {
    opacity: 1;
}

/* Toast Animations */
@keyframes anskToastSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes anskToastSlideOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ==========================================================================
   Confirmation Modal
   ========================================================================== */

.ansk-pos-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.ansk-pos-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: anskFadeIn 0.2s ease-out;
}

.ansk-pos-confirm-dialog {
    position: relative;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    animation: anskConfirmSlideIn 0.3s ease-out;
}

.ansk-pos-confirm-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fff3cd;
    color: #856404;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ansk-pos-confirm-icon.danger {
    background: #ffe8e8;
    color: #dc3545;
}

.ansk-pos-confirm-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 600;
    color: #282c3f;
}

.ansk-pos-confirm-message {
    margin: 0 0 24px;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.ansk-pos-confirm-actions {
    display: flex;
    gap: 12px;
}

.ansk-pos-confirm-actions button {
    flex: 1;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.ansk-pos-confirm-cancel {
    background: #f5f5f6;
    color: #282c3f;
}

.ansk-pos-confirm-cancel:hover {
    background: #e9e9eb;
}

.ansk-pos-confirm-ok {
    background: #ff3f6c;
    color: #fff;
}

.ansk-pos-confirm-ok:hover {
    background: #e5395f;
}

.ansk-pos-confirm-ok.success {
    background: #28a745;
}

.ansk-pos-confirm-ok.success:hover {
    background: #218838;
}

/* Confirmation Modal Animations */
@keyframes anskFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes anskConfirmSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ==========================================================================
   Mobile Adjustments
   ========================================================================== */

@media (max-width: 480px) {
    .ansk-pos-notifications {
        bottom: 10px;
        width: calc(100% - 20px);
    }
    
    .ansk-pos-confirm-dialog {
        padding: 24px 20px;
    }
    
    .ansk-pos-confirm-actions {
        flex-direction: column-reverse;
    }
}
