/* WooCommerce Toast Notices — v1.0.0 */

/* Hide original WooCommerce notices */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
    display: none !important;
}

/* Toast container */
#wtn-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
    max-width: 340px;
    width: calc(100vw - 48px);
}

/* Individual toast */
.wtn-toast {
    pointer-events: all;
    width: 100%;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.07);
    overflow: hidden;
    box-shadow:
        0 4px 6px rgba(0, 0, 0, 0.04),
        0 10px 28px rgba(0, 0, 0, 0.09);
    opacity: 0;
    transform: translateX(20px) scale(0.97);
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

.wtn-toast.wtn-hide {
    opacity: 0;
    transform: translateX(24px) scale(0.97);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Inner layout */
.wtn-inner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 14px 12px 14px;
}

/* Icon circle */
.wtn-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 1px;
}
.wtn-icon svg {
    width: 18px;
    height: 18px;
    display: block;
}

.wtn-toast.wtn-success .wtn-icon { background: #edfaf4; }
.wtn-toast.wtn-error   .wtn-icon { background: #fef0ef; }
.wtn-toast.wtn-info    .wtn-icon { background: #eef4ff; }

/* Text body */
.wtn-body {
    flex: 1;
    min-width: 0;
}
.wtn-title {
    font-size: 13.5px;
    font-weight: 600;
    color: #111111;
    margin: 0 0 3px 0;
    line-height: 1.35;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.wtn-msg {
    font-size: 12.5px;
    color: #666666;
    margin: 0;
    line-height: 1.5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    word-break: break-word;
}

/* Close button */
.wtn-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 3px;
    color: #aaaaaa;
    line-height: 1;
    flex-shrink: 0;
    margin-top: 0px;
    border-radius: 5px;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wtn-close:hover {
    background: #f2f2f2;
    color: #333333;
}
.wtn-close svg {
    width: 14px;
    height: 14px;
    display: block;
}

/* Progress bar */
.wtn-bar {
    height: 3px;
    background: #eeeeee;
    position: relative;
    overflow: hidden;
}
.wtn-fill {
    position: absolute;
    inset: 0;
    transform-origin: left center;
    transform: scaleX(1);
}
.wtn-toast.wtn-success .wtn-fill { background: #22c57a; }
.wtn-toast.wtn-error   .wtn-fill { background: #f06060; }
.wtn-toast.wtn-info    .wtn-fill { background: #4a7ff5; }

/* Admin bar offset */
.admin-bar #wtn-container {
    top: 56px;
}
@media screen and (max-width: 782px) {
    .admin-bar #wtn-container {
        top: 70px;
    }
}

/* Mobile adjustments */
@media (max-width: 480px) {
    #wtn-container {
        top: auto;
        bottom: 20px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
    .wtn-toast.wtn-hide {
        transform: translateY(12px) scale(0.97);
    }
}
