/* Root Variables */
:root {
    --success: var(--success);
    --secondary: var(--secondary);
    --error: var(--error);
    --info: var(--info);
    --white: var(--text-button);
    --background: var(--bg-surface);
    --text-color: var(--text-title);
    --primary: var(--primary);
    --transition-duration: 0.5s; /* Smoother animations */
}

/* Notification Stack */
.strts-notification-stack {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999999;
}

/* Base Styles */
.strts-notification {
    position: relative;
    width: max-content;
    background-color: var(--white);
    border-radius: var(--radius-full);
    padding: var(--space-xs);
    margin-bottom: var(--space-m);
    transform: scale(0.8) translateY(-30px);
    opacity: 0;
    transition: opacity var(--transition-duration) ease-out, transform var(--transition-duration) ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 9999;
}

.strts-notification--show {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.strts-notification--expanded {
    border-radius: var(--space-m); /* Apply theme value when expanded */
}

/* Notification Header */
.strts-notification__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
}

.strts-notification__icon-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.strts-notification__icon {
    width: 40px;
    height: 40px;
    padding: var(--space-xs);
    background-color: var(--info);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.strts-notification__icon svg {
    width: 24px;
    height: 24px;
    fill: var(--white);
}

.strts-notification__content {
    margin-left: 10px;
    flex-grow: 1;
}

.strts-notification__title {
    font-size: var(--text-l);
    font-weight: bold;
    color: var(--primary);
    line-height: 1.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14.9rem;
    margin-top: 0.2rem;
}

.strts-notification__subtitle {
    font-size: var(--text-m);
    font-weight: 700;
    color: var(--text-title);
    line-height: 1.375rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 14.9rem;
}

/* Description */
.strts-notification__description {
    display: none;
    margin-top: 0.5rem;
    font-size: var(--text-m);
    line-height: 1.375rem;
    color: var(--text-title);
    word-wrap: break-word;
    white-space: normal;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
}

.strts-notification--expanded .strts-notification__description {
    display: block;
    max-width: 300px; /* Set max height to expand properly */
	max-height: 200px;
    opacity: 1;
}



.strts-notification--expanded .strts-notification__subtitle {
	white-space: normal;
    overflow: unset;
    text-overflow: unset;
    max-width: 300px;
}

/* Arrow Container */
.strts-notification__arrow-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 2.5rem;
    height: 2.5rem;
    background-color: #F7F7F7;
    border-radius: 50%;
    margin-left: auto;
    flex-shrink: 0;
}

.strts-notification__arrow svg {
    width: 1rem;
    height: auto;
    fill: var(--primary);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.strts-notification--expanded .strts-notification__arrow svg {
    transform: rotate(180deg);
}

/* Extended Buttons */
.strts-notification__extended-buttons {
    display: none;
    padding: 10px;
    justify-content: flex-end;
    opacity: 0;
    transition: opacity 0.25s ease;
}
.strts-notification--expanded .strts-notification__header, .strts-notification--expanded .strts-notification__icon-title {
	    align-items: flex-start;
}

.strts-notification--expanded .strts-notification__extended-buttons {
    display: flex;
    opacity: 1;
}

/* Notification Button Styles */
.strts-notification__button {
    width: 49%;
    padding: 0.6rem 0.9375rem;
    border: 0.3125rem solid #F7F7F7;
    border-radius: 2.5rem;
    background-color: var(--primary);
    color: var(--white);
    cursor: pointer;
    text-align: center;
    font-size: var(--text-m);
    font-weight: bold;
    line-height: 22px;
    transition: background-color 0.2s ease-in-out;
}

.strts-notification__button:hover {
    background-color: #3b6b85;
}

/* Different Notification Types */
.strts-notification--success .strts-notification__icon {
    background-color: var(--success);
}

.strts-notification--success .strts-notification__title {
    color: var(--success);
}

.strts-notification--warning .strts-notification__icon {
    background-color: var(--secondary);
}

.strts-notification--warning .strts-notification__title {
    color: var(--secondary);
}

.strts-notification--error .strts-notification__icon {
    background-color: var(--error);
}

.strts-notification--error .strts-notification__title {
    color: var(--error);
}

.strts-notification--info .strts-notification__icon {
    background-color: var(--info);
}

.strts-notification--info .strts-notification__title {
    color: var(--info);
}

/* Swipe Animations */
@keyframes swipe-left {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(-100%);
        opacity: 0;
    }
}

@keyframes swipe-right {
    0% {
        transform: translateX(0);
        opacity: 1;
    }
    100% {
        transform: translateX(100%);
        opacity: 0;
    }
}

.strts-notification--swipe-left {
    animation: swipe-left 0.5s forwards;
}

.strts-notification--swipe-right {
    animation: swipe-right 0.5s forwards;
}

/* Exit Animation */
.strts-notification--hide {
    opacity: 0;
    transform: scale(0.9) translateY(-20px);
    transition: opacity 0.5s ease-in, transform 0.5s ease-in;
}
