/**
 * B2C Notifications - Glassmorphism iOS Style
 */

#b2c-notifications-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    pointer-events: none;
    max-width: 400px;
}

.b2c-notification {
    font-family: inherit;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.1);
    padding: 18px 50px 18px 20px;
    margin-bottom: 12px;
    max-height: 200px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                padding-top 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                padding-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                margin-bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.b2c-notification--show {
    transform: translateX(0);
    opacity: 1;
}

.b2c-notification--hiding {
    transform: translateX(120%);
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
}

.b2c-notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    flex-shrink: 0;
}

.b2c-notification-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.b2c-notification--error .b2c-notification-icon {
    background: #ff3b30;
}

.b2c-notification--success .b2c-notification-icon {
    background: #34c759;
}

.b2c-notification--info .b2c-notification-icon {
    background: #007aff;
}

.b2c-notification-content {
    flex: 1;
}

.b2c-notification-title {
    font-weight: 600;
    font-size: 15px;
    color: #000000;
    margin-bottom: 4px;
}

.b2c-notification-message {
    font-size: 14px;
    line-height: 1.4;
    color: #000000;
}

.b2c-notification-message strong {
    font-weight: 700;
}

.b2c-notification-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.15);
    border: none;
    border-radius: 50%;
    color: rgba(0, 0, 0, 0.5);
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    line-height: 1;
    flex-shrink: 0;
}

.b2c-notification-icon svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.b2c-notification-close:hover {
    background: rgba(0, 0, 0, 0.25);
    color: rgba(0, 0, 0, 0.7);
}

/* Admin bar de WordPress: 32px desktop, 46px móvil */
.admin-bar #b2c-notifications-container {
    top: 52px;
}

@media (max-width: 768px) {
    #b2c-notifications-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    .admin-bar #b2c-notifications-container {
        top: 56px;
    }
    .b2c-notification {
        padding: 16px 45px 16px 18px;
    }
    .b2c-notification-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    .b2c-notification-title {
        font-size: 14px;
    }
    .b2c-notification-message {
        font-size: 13px;
    }
}

/* =============================================================================
   Ocultar wrapper HTML nativo de WooCommerce (usamos toast propio)
   ============================================================================= */

.woocommerce-notices-wrapper {
    display: none !important;
}

@media (prefers-reduced-motion: reduce) {
    .b2c-notification {
        transition: none;
    }
}
