/* Minimal Notification System */
:root {
    --notification-success: #5BC0BE;
    --notification-error: #E57373;
    --notification-warning: #FFB74D;
    --notification-info: #4B89AC;
}

/* Toast Notification */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast {
    min-width: 300px;
    max-width: 360px;
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    position: relative;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    pointer-events: auto;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hiding {
    transform: translateX(100%);
    opacity: 0;
}

.toast::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--notification-info);
}

.toast.success::before {
    background: var(--notification-success);
}

.toast.error::before {
    background: var(--notification-error);
}

.toast.warning::before {
    background: var(--notification-warning);
}

.toast.info::before {
    background: var(--notification-info);
}

.toast-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    color: white;
    background: var(--notification-info);
}

.toast.success .toast-icon {
    background: var(--notification-success);
}

.toast.error .toast-icon {
    background: var(--notification-error);
}

.toast.warning .toast-icon {
    background: var(--notification-warning);
}

.toast.info .toast-icon {
    background: var(--notification-info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
    margin-bottom: 4px;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.toast-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--text-soft);
    cursor: pointer;
    opacity: 0.6;
}

.toast-close:hover {
    opacity: 1;
}

/* Notification Container */
.notification-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 10000001;
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 360px;
    pointer-events: none;
}

.notification {
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: auto;
    position: relative;
    overflow: hidden;
    min-width: 300px;
    z-index: 10000001;
}

.notification::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--notification-info);
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification.hide {
    transform: translateX(100%);
    opacity: 0;
}

.notification-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    color: white;
    background: var(--notification-info);
}

.notification-success .notification-icon {
    background: var(--notification-success);
}

.notification-error .notification-icon {
    background: var(--notification-error);
}

.notification-error::before {
    background: var(--notification-error);
}

.notification-warning .notification-icon {
    background: var(--notification-warning);
}

.notification-info .notification-icon {
    background: var(--notification-info);
}

.notification-content {
    flex: 1;
    padding-right: 10px;
}

.notification-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
    color: var(--text-main);
}

.notification-message {
    font-size: 0.85rem;
    color: var(--text-soft);
    line-height: 1.4;
}

.notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--text-soft);
    opacity: 0.6;
    font-size: 18px;
}

.notification-close:hover {
    opacity: 1;
}

.notification-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(0, 0, 0, 0.05);
    width: 100%;
}

.notification-progress-bar {
    height: 100%;
    background: var(--notification-info);
    transition: width linear;
}

.notification-success .notification-progress-bar {
    background: var(--notification-success);
}

.notification-error .notification-progress-bar {
    background: var(--notification-error);
}

.notification-warning .notification-progress-bar {
    background: var(--notification-warning);
}

.notification-info .notification-progress-bar {
    background: var(--notification-info);
}

/* Modal System */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: white;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    padding: 32px;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.custom-modal-overlay.show .custom-modal {
    transform: scale(1);
    opacity: 1;
}

.custom-modal-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.custom-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
    color: white;
    background: var(--notification-info);
}

.custom-modal-success .custom-modal-icon {
    background: var(--notification-success);
}

.custom-modal-error .custom-modal-icon {
    background: var(--notification-error);
}

.custom-modal-warning .custom-modal-icon {
    background: var(--notification-warning);
}

.custom-modal-info .custom-modal-icon {
    background: var(--notification-info);
}

.custom-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
}

.custom-modal-message {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
    margin-bottom: 24px;
}

.custom-modal-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.custom-modal-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700 !important;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.custom-modal-btn-primary {
    background: var(--calm-primary) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(75, 137, 172, 0.2);
}

.custom-modal-btn-primary:hover {
    background: #3d7a9a !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 137, 172, 0.3);
}

.custom-modal-btn-primary *,
.custom-modal-btn-primary span,
.custom-modal-btn-primary p {
    color: #FFFFFF !important;
}

.custom-modal-btn-secondary {
    background: #F3F4F6 !important;
    color: #1F2937 !important;
    border: 1.5px solid #D1D5DB !important;
}

.custom-modal-btn-secondary:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
    border-color: #9CA3AF !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.custom-modal-btn-secondary *,
.custom-modal-btn-secondary span,
.custom-modal-btn-secondary p {
    color: inherit !important;
}

.custom-modal-btn-danger {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.2);
}

.custom-modal-btn-danger:hover {
    background: #B91C1C !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.custom-modal-btn-danger *,
.custom-modal-btn-danger span,
.custom-modal-btn-danger p {
    color: #FFFFFF !important;
}

/* Rating Modal Specific */
.rating-modal {
    padding: 0;
}

.rating-modal .custom-modal-header {
    background: var(--background-main);
    border-bottom: 1px solid var(--border-soft);
    padding: 20px;
    margin-bottom: 0;
    justify-content: center;
}

.rating-modal-body {
    padding: 24px;
    text-align: center;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    font-size: 32px;
    margin: 16px 0;
}

.rating-stars .star {
    color: #E0E0E0;
    cursor: pointer;
    transition: color 0.2s;
}

.rating-stars .star:hover,
.rating-stars .star.filled {
    color: #FFB74D;
}

.rating-modal-buttons {
    padding: 0 24px 24px;
    justify-content: center;
}

/* Confirm Modal */
.confirm-overlay {
    position: fixed;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.confirm-modal {
    background: white;
    border-radius: 12px;
    padding: 32px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: confirmPopIn 0.25s ease;
}

@keyframes confirmPopIn {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #E3F2FD;
    color: var(--calm-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto;
}

.confirm-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
}

.confirm-message {
    font-size: 0.95rem;
    color: var(--text-soft);
    line-height: 1.5;
}

.confirm-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 8px;
}

.confirm-btn {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700 !important;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    letter-spacing: 0.3px;
}

.confirm-btn-confirm {
    background: var(--calm-primary) !important;
    color: #FFFFFF !important;
    box-shadow: 0 2px 8px rgba(75, 137, 172, 0.2);
}

.confirm-btn-confirm:hover {
    background: #3d7a9a !important;
    color: #FFFFFF !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(75, 137, 172, 0.3);
}

.confirm-btn-confirm *,
.confirm-btn-confirm span,
.confirm-btn-confirm p {
    color: #FFFFFF !important;
}

.confirm-btn-cancel {
    background: #F3F4F6 !important;
    color: #1F2937 !important;
    border: 1.5px solid #D1D5DB !important;
}

.confirm-btn-cancel:hover {
    background: #E5E7EB !important;
    color: #111827 !important;
    border-color: #9CA3AF !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.confirm-btn-cancel *,
.confirm-btn-cancel span,
.confirm-btn-cancel p {
    color: inherit !important;
}

@media (max-width: 480px) {

    .toast,
    .notification {
        width: 95%;
        min-width: auto;
        margin: 0 auto;
    }

    .toast-container,
    .notification-container {
        left: 0;
        right: 0;
        align-items: center;
    }
}

/* ============================================
   DARK THEME - NOTIFICATION SYSTEM STYLES
   ============================================ */

html[data-theme="dark"] .toast,
html.dark-theme .toast {
    background: #1e1e1e;
    border-color: #404040;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .toast-title,
html.dark-theme .toast-title {
    color: #f5f5f5;
}

html[data-theme="dark"] .toast-message,
html.dark-theme .toast-message {
    color: #b0b0b0;
}

html[data-theme="dark"] .toast-close,
html.dark-theme .toast-close {
    color: #888888;
}

html[data-theme="dark"] .notification,
html.dark-theme .notification {
    background: #1e1e1e;
    border-color: #404040;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html[data-theme="dark"] .notification-title,
html.dark-theme .notification-title {
    color: #f5f5f5;
}

html[data-theme="dark"] .notification-message,
html.dark-theme .notification-message {
    color: #b0b0b0;
}

html[data-theme="dark"] .notification-close,
html.dark-theme .notification-close {
    color: #888888;
}

html[data-theme="dark"] .notification-progress,
html.dark-theme .notification-progress {
    background: rgba(255, 255, 255, 0.1);
}

/* Dark Theme - Modal */
html[data-theme="dark"] .custom-modal-overlay,
html.dark-theme .custom-modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .custom-modal,
html.dark-theme .custom-modal {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .custom-modal-title,
html.dark-theme .custom-modal-title {
    color: #f5f5f5;
}

html[data-theme="dark"] .custom-modal-message,
html.dark-theme .custom-modal-message {
    color: #b0b0b0;
}

html[data-theme="dark"] .custom-modal-btn-secondary,
html.dark-theme .custom-modal-btn-secondary {
    background: #333333 !important;
    border-color: #4b5563 !important;
    color: #f5f5f5 !important;
}

html[data-theme="dark"] .custom-modal-btn-secondary:hover,
html.dark-theme .custom-modal-btn-secondary:hover {
    background: #404040 !important;
    border-color: #6b7280 !important;
}

/* Dark Theme - Rating Modal */
html[data-theme="dark"] .rating-modal .custom-modal-header,
html.dark-theme .rating-modal .custom-modal-header {
    background: #252525;
    border-bottom-color: #333333;
}

html[data-theme="dark"] .rating-stars .star,
html.dark-theme .rating-stars .star {
    color: #404040;
}

/* Dark Theme - Confirm Modal */
html[data-theme="dark"] .confirm-overlay,
html.dark-theme .confirm-overlay {
    background: rgba(0, 0, 0, 0.7);
}

html[data-theme="dark"] .confirm-modal,
html.dark-theme .confirm-modal {
    background: #1e1e1e;
    border-color: #333333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

html[data-theme="dark"] .confirm-icon,
html.dark-theme .confirm-icon {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

html[data-theme="dark"] .confirm-title,
html.dark-theme .confirm-title {
    color: #f5f5f5;
}

html[data-theme="dark"] .confirm-message,
html.dark-theme .confirm-message {
    color: #b0b0b0;
}

html[data-theme="dark"] .confirm-btn-cancel,
html.dark-theme .confirm-btn-cancel {
    background: #333333 !important;
    border-color: #4b5563 !important;
    color: #f5f5f5 !important;
}

html[data-theme="dark"] .confirm-btn-cancel:hover,
html.dark-theme .confirm-btn-cancel:hover {
    background: #404040 !important;
    border-color: #6b7280 !important;
}