/* Custom Notification Styles */

/* Ensure the notification container stays on top */
.custom-notification-container {
    position: fixed;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    pointer-events: none;
    max-width: 90%;
    width: 400px;
}

/* Enable pointer events on the actual notification items */
.custom-notification-container .message-box-item {
    pointer-events: auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform: translateY(20px) scale(0.9);
}

/* Animation State: Visible */
.custom-notification-container .message-box-item.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Animation State: Removing */
.custom-notification-container .message-box-item.hide {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
    margin-top: -80px;
}


/* Message Box Item Base */
.message-box-item {
    display: flex;
    align-items: flex-start;
    /* Align to top for long text */
    justify-content: space-between;
    padding: 20px 30px;
    border-radius: 28px;
    font-family: system-ui, -apple-system, sans-serif;
    font-size: 15px;
    font-weight: 500;
    flex-wrap: nowrap;
    /* Prevent wrapping of icon */
}

/* 
   ---------------------------
   STYLE VARIANTS
   ---------------------------
*/

/* GLASS STYLE (Translucent + Blur) - Default */
.message-box-item.notif-glass {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Info (Blue) */
.message-box-item.notif-glass {
    background-color: rgba(205, 233, 246, 0.65);
    color: #4780aa;
}

/* Warning (Yellow) */
.message-box-item.notif-glass.style2 {
    background-color: rgba(247, 243, 215, 0.65);
    color: #927238;
}

/* Error (Red) */
.message-box-item.notif-glass.style3 {
    background-color: rgba(236, 200, 197, 0.65);
    color: #ab3331;
}

/* Success (Green) */
.message-box-item.notif-glass.style4 {
    background-color: rgba(222, 242, 215, 0.65);
    color: #5b7052;
}


/* SOLID STYLE (Opaque / No Blur) */
.message-box-item.notif-solid {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    /* Slightly stronger shadow for solid cards */
}

/* Info (Blue) - Solid equivalents roughly matching the glass feel */
.message-box-item.notif-solid {
    background-color: #e3f2fd;
    color: #1565c0;
}

/* Warning (Yellow) */
.message-box-item.notif-solid.style2 {
    background-color: #fff9c4;
    color: #f57f17;
}

/* Error (Red) */
.message-box-item.notif-solid.style3 {
    background-color: #ffebee;
    color: #c62828;
}

/* Success (Green) */
.message-box-item.notif-solid.style4 {
    background-color: #e8f5e9;
    color: #2e7d32;
}


/* Close Cursor */
.icon-close-ms-box {
    cursor: pointer;
    margin-left: 15px;
    font-size: 24px;
    display: flex;
    justify-content: center;
    width: 24px;
    height: 24px;
    line-height: 0.8;
    opacity: 0.5;
    transition: opacity 0.2s;
    flex-shrink: 0;
    /* Never shrink the icon */
    margin-top: -2px;
    /* Slight optical adjustment for top alignment */
}

.icon-close-ms-box:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
}

/* Allow text to wrap if it's long */
.message-box-item .text {
    flex-grow: 1;
    padding-right: 15px;
    word-break: break-word;
}

/* ---- Action Buttons (For Confirmation) ---- */
.message-box-actions {
    width: 100%;
    margin-top: 15px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.msg-btn {
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

/* Button Colors need to adapt slightly or stay consistent. Keeping generic functional colors is safer. */

/* Confirm Button */
.msg-btn-confirm {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Glass Buttons */
.message-box-item.notif-glass .msg-btn-confirm {
    background-color: #4780aa;
    color: white;
}

.message-box-item.notif-glass.style2 .msg-btn-confirm {
    background-color: #927238;
}

.message-box-item.notif-glass.style3 .msg-btn-confirm {
    background-color: #ab3331;
}

.message-box-item.notif-glass.style4 .msg-btn-confirm {
    background-color: #5b7052;
}

/* Solid Buttons - Use Darker text color as background for contrast */
.message-box-item.notif-solid .msg-btn-confirm {
    background-color: #1565c0;
    color: white;
}

.message-box-item.notif-solid.style2 .msg-btn-confirm {
    background-color: #f57f17;
}

.message-box-item.notif-solid.style3 .msg-btn-confirm {
    background-color: #c62828;
}

.message-box-item.notif-solid.style4 .msg-btn-confirm {
    background-color: #2e7d32;
}

.msg-btn-confirm:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

.msg-btn-cancel {
    background: transparent;
    border: 1px solid currentColor;
    color: inherit;
    opacity: 0.7;
}

.msg-btn-cancel:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
}


/* ---- Positioning Classes ---- */

/* Top Left */
.notif-top-left {
    top: 20px;
    left: 20px;
}

/* Top Center */
.notif-top-center {
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
}

/* Top Right */
.notif-top-right {
    top: 20px;
    right: 20px;
    align-items: flex-end;
}

/* Center */
.notif-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    align-items: center;
}

/* Bottom Left */
.notif-bottom-left {
    bottom: 20px;
    left: 20px;
    flex-direction: column-reverse;
}

/* Bottom Center */
.notif-bottom-center {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    align-items: center;
    flex-direction: column-reverse;
}

/* Bottom Right */
.notif-bottom-right {
    bottom: 20px;
    right: 20px;
    align-items: flex-end;
    flex-direction: column-reverse;
}