/* ============================================
   Market Notification System
   Types: Modal, Toast, Banner, SlideIn, Snackbar
   ============================================ */

/* ---- Notification Container ---- */

.market-notif-container {
    position: fixed;
    z-index: 99999;
    pointer-events: none;
}

.market-notif-container.toast-container {
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.market-notif-container.snackbar-container {
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.market-notif-container.banner-container {
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.market-notif-container.slidein-container {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
}

/* ---- Base Notification ---- */

.market-notif {
    pointer-events: auto;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.market-notif-hidden {
    display: none !important;
}

/* ---- Modal Overlay ---- */

.market-notif-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 99998;
    background: rgba(0, 0, 0, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: marketFadeIn 0.2s ease-out;
}

.market-notif-modal-overlay.closing {
    animation: marketFadeOut 0.2s ease-in forwards;
}

.market-notif-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 28px 32px 24px;
    width: 100%;
    max-width: 420px;
    position: relative;
    animation: marketScaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: center;
}

.market-notif-modal.closing {
    animation: marketScaleOut 0.2s ease-in forwards;
}

.market-notif-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.15s;
}

.market-notif-modal-close:hover {
    color: #333;
}

.market-notif-modal-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 24px;
}

.market-notif-modal-icon.success {
    background: #e8f5e9;
    color: #2e7d32;
}

.market-notif-modal-icon.error {
    background: #ffebee;
    color: #c62828;
}

.market-notif-modal-icon.warning {
    background: #fff8e1;
    color: #f57f17;
}

.market-notif-modal-icon.info {
    background: #e3f2fd;
    color: #1565c0;
}

.market-notif-modal h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin: 0 0 8px;
}

.market-notif-modal p {
    font-size: 14px;
    color: #666;
    margin: 0 0 20px;
    line-height: 1.5;
}

.market-notif-modal-actions {
    display: flex;
    gap: 10px;
}

.market-notif-modal-actions .market-btn {
    flex: 1;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.market-notif-modal-btn-cancel {
    background: #f5f5f5;
    color: #555;
    border: 1px solid #ddd;
}

.market-notif-modal-btn-cancel:hover {
    background: #e8e8e8;
    color: #333;
}

.market-notif-modal-btn-confirm {
    background: #0072BC;
    color: #fff;
    border: 1px solid #0072BC;
}

.market-notif-modal-btn-confirm:hover {
    background: #005D9E;
    border-color: #005D9E;
}

.market-notif-modal-btn-confirm.danger {
    background: #CC0000;
    border-color: #CC0000;
}

.market-notif-modal-btn-confirm.danger:hover {
    background: #AA0000;
    border-color: #AA0000;
}

/* ---- Toast Notification ---- */

.market-notif-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 14px 16px;
    min-width: 300px;
    max-width: 400px;
    border-left: 4px solid #ddd;
    animation: marketSlideInRight 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-notif-toast.closing {
    animation: marketSlideOutRight 0.3s ease-in forwards;
}

.market-notif-toast.success {
    border-left-color: #2e7d32;
}

.market-notif-toast.error {
    border-left-color: #c62828;
}

.market-notif-toast.warning {
    border-left-color: #f57f17;
}

.market-notif-toast.info {
    border-left-color: #1565c0;
}

.market-notif-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.market-notif-toast.success .market-notif-toast-icon {
    color: #2e7d32;
}

.market-notif-toast.error .market-notif-toast-icon {
    color: #c62828;
}

.market-notif-toast.warning .market-notif-toast-icon {
    color: #f57f17;
}

.market-notif-toast.info .market-notif-toast-icon {
    color: #1565c0;
}

.market-notif-toast-content {
    flex: 1;
    min-width: 0;
}

.market-notif-toast-title {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    display: block;
}

.market-notif-toast-msg {
    font-size: 12px;
    color: #777;
    display: block;
    margin-top: 1px;
}

.market-notif-toast-close {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    padding: 2px;
    font-size: 14px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.market-notif-toast-close:hover {
    color: #666;
}

/* ---- Banner Notification ---- */

.market-notif-banner {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    animation: marketSlideInTop 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-notif-banner.closing {
    animation: marketSlideOutTop 0.3s ease-in forwards;
}

.market-notif-banner.success {
    background: #f1f8e9;
    border-bottom-color: #7cb342;
}

.market-notif-banner.error {
    background: #fce4ec;
    border-bottom-color: #e53935;
}

.market-notif-banner.warning {
    background: #fff8e1;
    border-bottom-color: #ffb300;
}

.market-notif-banner.info {
    background: #e3f2fd;
    border-bottom-color: #1e88e5;
}

.market-notif-banner-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.market-notif-banner.success .market-notif-banner-icon {
    color: #7cb342;
}

.market-notif-banner.error .market-notif-banner-icon {
    color: #e53935;
}

.market-notif-banner.warning .market-notif-banner-icon {
    color: #ffb300;
}

.market-notif-banner.info .market-notif-banner-icon {
    color: #1e88e5;
}

.market-notif-banner-content {
    flex: 1;
}

.market-notif-banner-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.market-notif-banner-msg {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

.market-notif-banner-close {
    background: none;
    border: none;
    font-size: 16px;
    color: #999;
    cursor: pointer;
    padding: 4px;
    transition: color 0.15s;
}

.market-notif-banner-close:hover {
    color: #333;
}

.market-notif-banner-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.market-notif-banner-actions .market-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.market-notif-banner-btn-confirm {
    background: #0072BC;
    color: #fff;
    border-color: #0072BC;
}

.market-notif-banner-btn-confirm:hover {
    background: #005D9E;
}

.market-notif-banner-btn-dismiss {
    background: transparent;
    color: #666;
    border-color: #ccc;
}

.market-notif-banner-btn-dismiss:hover {
    background: #f5f5f5;
}

/* ---- SlideIn Notification ---- */

.market-notif-slidein {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fff;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 16px 18px;
    border-left: 4px solid #ddd;
    animation: marketSlideInLeft 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-notif-slidein.closing {
    animation: marketSlideOutLeft 0.3s ease-in forwards;
}

.market-notif-slidein.success {
    border-left-color: #2e7d32;
}

.market-notif-slidein.error {
    border-left-color: #c62828;
}

.market-notif-slidein.warning {
    border-left-color: #f57f17;
}

.market-notif-slidein.info {
    border-left-color: #1565c0;
}

.market-notif-slidein-icon {
    font-size: 20px;
    flex-shrink: 0;
    margin-top: 2px;
}

.market-notif-slidein.success .market-notif-slidein-icon {
    color: #2e7d32;
}

.market-notif-slidein.error .market-notif-slidein-icon {
    color: #c62828;
}

.market-notif-slidein.warning .market-notif-slidein-icon {
    color: #f57f17;
}

.market-notif-slidein.info .market-notif-slidein-icon {
    color: #1565c0;
}

.market-notif-slidein-content {
    flex: 1;
}

.market-notif-slidein-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.market-notif-slidein-msg {
    font-size: 13px;
    color: #777;
    margin-top: 3px;
}

.market-notif-slidein-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.market-notif-slidein-actions .market-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}

.market-notif-slidein-btn-confirm {
    background: #0072BC;
    color: #fff;
    border-color: #0072BC;
}

.market-notif-slidein-btn-confirm:hover {
    background: #005D9E;
}

.market-notif-slidein-btn-confirm.danger {
    background: #CC0000;
    border-color: #CC0000;
}

.market-notif-slidein-btn-confirm.danger:hover {
    background: #AA0000;
    border-color: #AA0000;
}

.market-notif-slidein-btn-dismiss {
    background: #f5f5f5;
    color: #666;
    border-color: #ddd;
}

.market-notif-slidein-btn-dismiss:hover {
    background: #e8e8e8;
}

.market-notif-slidein-close {
    background: none;
    border: none;
    color: #ccc;
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.market-notif-slidein-close:hover {
    color: #666;
}

/* ---- Snackbar Notification ---- */

.market-notif-snackbar {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #323232;
    border-radius: 8px;
    padding: 12px 20px;
    min-width: 280px;
    max-width: 500px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    animation: marketSlideInBottom 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.market-notif-snackbar.closing {
    animation: marketSlideOutBottom 0.3s ease-in forwards;
}

.market-notif-snackbar.success {
    background: #1b5e20;
}

.market-notif-snackbar.error {
    background: #b71c1c;
}

.market-notif-snackbar.warning {
    background: #e65100;
}

.market-notif-snackbar.info {
    background: #01579b;
}

.market-notif-snackbar-icon {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.market-notif-snackbar-content {
    flex: 1;
    color: #fff;
    font-size: 13px;
    font-weight: 500;
}

.market-notif-snackbar-action {
    background: none;
    border: none;
    color: #FFD54F;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    padding: 4px 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
    transition: opacity 0.15s;
}

.market-notif-snackbar-action:hover {
    opacity: 0.8;
}

.market-notif-snackbar-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    font-size: 14px;
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.15s;
}

.market-notif-snackbar-close:hover {
    color: rgba(255, 255, 255, 0.9);
}

/* ---- Animations ---- */

@keyframes marketFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes marketFadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes marketScaleIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes marketScaleOut {
    from { transform: scale(1); opacity: 1; }
    to { transform: scale(0.9); opacity: 0; }
}

@keyframes marketSlideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes marketSlideOutRight {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

@keyframes marketSlideInLeft {
    from { transform: translateX(-100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes marketSlideOutLeft {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(-100%); opacity: 0; }
}

@keyframes marketSlideInTop {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes marketSlideOutTop {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(-100%); opacity: 0; }
}

@keyframes marketSlideInBottom {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes marketSlideOutBottom {
    from { transform: translateY(0); opacity: 1; }
    to { transform: translateY(100%); opacity: 0; }
}

/* ---- Responsive ---- */

@media screen and (max-width: 600px) {
    .market-notif-modal {
        padding: 20px;
        max-width: 100%;
        margin: 10px;
    }

    .market-notif-modal-actions {
        flex-direction: column;
    }

    .market-notif-container.toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .market-notif-toast {
        min-width: 0;
    }

    .market-notif-banner {
        max-width: 100%;
        flex-wrap: wrap;
    }

    .market-notif-snackbar {
        min-width: 0;
        max-width: 100%;
        margin: 0 10px;
    }
}
