/* Toast Container */
.toast-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Individual Toast Message */
.toast-message {
    background-color: var(--theme-surface);
    color: var(--theme-text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: var(--theme-shadow-lg);
    display: flex;
    align-items: flex-start;
    min-width: 280px;
    max-width: 350px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, background-color 0.3s ease, color 0.3s ease;
    border-left: 4px solid var(--theme-accent-primary);
    position: relative;
}

.toast-message.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-message.hide {
    opacity: 0;
    transform: translateY(20px);
}

.toast-message .icon-wrapper {
    margin-right: 12px; /* Space between icon and text */
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* Size of the green square */
    height: 28px;
    background-color: #28A745; /* Green background for icon */
    border-radius: 6px; /* Slightly rounded green square */
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.toast-message .icon-wrapper svg {
    width: 18px; /* Size of the checkmark SVG */
    height: 18px;
    stroke: #FFFFFF; /* White checkmark */
    stroke-width: 2.5; /* Thicker checkmark */
}

.toast-message .content {
    flex-grow: 1;
    display: flex; /* Use flex for content to stack title and message */
    flex-direction: column;
    line-height: 1.4; /* Improve readability */
}

.toast-message .content .top-line {
    display: flex;
    align-items: center;
    gap: 5px; /* Space between product title and added to cart message if on same line */
}

.toast-message .product-title {
    font-weight: 600;
    white-space: nowrap; /* Prevent product title from wrapping */
    overflow: hidden;
    text-overflow: ellipsis; /* Add ellipsis if title is too long */
    max-width: 200px; /* Limit width to prevent overflow before ellipsis */
}

.toast-message .message-text {
    font-size: 0.9em;
    color: #4B5563; /* Slightly lighter gray for the secondary message */
}

.toast-message .icon-wrapper.error {
    background-color: #DC3545; /* Red background for error */
}

.toast-message .icon-wrapper.error svg {
    stroke: #FFFFFF; /* White cross icon */
}

.toast-message .icon-wrapper.info {
    background-color: #0D6EFD; /* Blue background for info */
}

.toast-message .icon-wrapper.info svg {
    stroke: #FFFFFF; /* White info icon */
}
