.alert-area {
    position: fixed;
    top: 0;
    right: 0;
    display: flex;
    z-index: 1050;
    flex-direction: column;
    gap: 20px;
    padding: 20px 0;
    align-items: flex-end;
}

.alert-area .alert:nth-child(1) {
    animation-delay: 600ms !important;
}
.alert-area .alert:nth-child(2) {
    animation-delay: 1200ms !important;
}

/* Notifications Styles */
.notifications-wrapper {
    position: relative;
    margin-right: 15px;
}

.notification-icon {
    position: relative;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-icon:hover {
    transform: scale(1.1);
}

.notification-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.notifications-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 420px;
    background: var(--card-bg);
    backdrop-filter: blur(30px);
    z-index: 1000;
    display: none;
    overflow: hidden;
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.0);
    border-left: solid 1px var(--border-color);
}

.notifications-dropdown.show {
    display: block;
    animation: slideDown 0.2s ease;
    box-shadow: 0 0 0 100vw rgba(0, 0, 0, 0.4);
    min-height: 650px;
}

.notifications-header,
.notifications-footer {
    padding: 0 15px;
    height: 60px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notifications-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.btn-link {
    background: none;
    border: none;
    color: #007bff;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.btn-link:hover {
    background: #e9ecef;
}

.notifications-list {
    height: calc(100% - 120px);
    overflow-y: auto;
}

.notification-item-dropdown {
    padding: 10px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: 0.2s ease;
}

.notification-item-dropdown:hover {
    background: #66666622;
}

.notification-item-dropdown:last-child {
    border-bottom: none;
}

.notification-item-dropdown .notification-inner {
    padding: 0 15px;
    border-bottom: none;
}

.notification-title-small {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: #333;
    display: flex;
    justify-content: start;
    align-items: center;
    gap: 8px;
}

.notification-item-dropdown .notification-inner {
    border-left: 10px solid #00000000;
}

.notification-item-dropdown.unread.info .notification-inner {
    border-left: 10px solid #4881EB;
}

.info .notification-title-small {
    color: #4881EB;
}

.notification-item-dropdown.unread.success .notification-inner {
    border-left: 10px solid #299466;
}

.success .notification-title-small {
    color: #299466;
}

.notification-item-dropdown.unread.warning .notification-inner {
    border-left: 10px solid #D78636;
}

.warning .notification-title-small,
.warning .notification-title-small .material-symbols-rounded {
    color: #D78636;
}

.notification-item-dropdown.unread.error .notification-inner {
    border-left: 10px solid #EB4848;
}

.error .notification-title-small {
    color: #EB4848;
}


.notification-message-small {
    font-size: 12px;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.notification-time-small {
    font-size: 11px;
    opacity: .9;
    color: var(--text);
}

.loading-notifications {
    padding: 20px;
    text-align: center;
    color: #666;
}

.loading-notifications .material-symbols-rounded {
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

.empty-notifications {
    padding: 20px;
    text-align: center;
    color: #999;
}

.empty-notifications .material-symbols-rounded {
    font-size: 32px;
    opacity: 0.5;
    margin-bottom: 8px;
}

.alert-notification {
    margin: 0 20px;
    border-radius: 100px;
    z-index: 1050;
    text-align: center;
    font-size: 1rem;
    font-weight: 500;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    color: #fff;
    display: flex;
    padding: 0;
    border-radius: 30px;
    backdrop-filter: blur(20px);
    max-width: 60px;
    overflow: hidden;
    transform: translateY(-100px);
    opacity: 0;
    animation: alert 2s ease-in-out forwards;
    background: #00000055;
}

.alert-notification.dismissed {
    max-width: 600px;
    opacity: 1;
    transform: translateX(0);
    animation: dismissed 600ms cubic-bezier(0.68,-0.55,0.27,1.55) forwards;
    animation-delay: 0;
}

@keyframes dismissed {
    0% {
        opacity: 1;
        transform: translateX(0);
    }
    100% {
        opacity: 0;
        transform: translateX(200px);
    }
}

.alert-notification .icon { 
    width: 60px;
    height: 60px;
    min-width: 60px;
    position: relative;
    overflow: hidden;
}

.alert-notification .icon .alert-timer {
    position: absolute;
    fill: none;
    stroke: #FFFFFF;
    stroke-width: 5px;
    stroke-dashoffset: -170;
    stroke-dasharray: 250;
    animation: alert-timer 8700ms linear forwards;
    animation-delay: 3s;
    animation-direction: reverse;
}

.alert-notification .text {
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px 20px;
    min-width: calc(600px - 120px);
    overflow: hidden;
    text-align: left;
    font-size: 14px;
    font-weight: 400;
}
.alert-notification .text h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.alert-notification::before {
    position: absolute;
    z-index: -1;
    content: '';
    opacity: .1;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
}

.alert-notification.success {
    border: var(--success) solid 1px;
}

.alert-notification.danger {
    border: var(--danger) solid 1px;
}

.alert-notification.success::before {
    background-color: var(--success);
}

.alert-notification.danger::before {
    background-color: var(--danger);
}

.alert-notification .icon {
    width: 60px;
    height: 60px;
}

.alert-notification.success .icon {
    background-color: var(--success);
    color: #FFFFFF;
}

.alert-notification.danger .icon {          
    background-color: var(--danger);
    color: #FFFFFF;
}

.alert-notification .btn-close {
    color: inherit;
    background: none;
    border: none;
    cursor: pointer;
    color: #FFF;
    width: 60px;
    height: 60px;
    min-width: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    transition: ease-in-out all 300ms;
}

.alert-notification.success .btn-close:hover {
    background: var(--success);
    color: #FFF;
}

.alert-notification.danger .btn-close:hover {
    background: var(--danger);
    color: #FFF;
}




/* ===== ALERTA BASE ===== */
.alert {
  position: relative;
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin: 10px 0;
  border-left: 5px solid transparent;
  border-radius: 6px;
  font-family: Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  background-color: #f9f9f9;
  animation: slideIn 0.3s ease-out;
}

.alert .material-symbols-rounded {
    font-size: 28px;
    margin-right: 8px;
    display: flex;
    align-items: center;
    width: 40px;
}

/* Ícone com Material Icons Rounded */
.alert .alert-icon {
  font-size: 22px;
  margin-right: 8px;
  display: flex;
  align-items: center;
}

/* ===== VARIAÇÕES DE CORES ===== */
.alert.success {
    border-left-color: #28a745;
    background-color: #e6f4ea;
    color: #155724;
}

.alert.danger {
    border-left-color: #dc3545;
    background-color: #fbeaea;
    color: #721c24;
}

.alert.warning {
    border-left-color: #ffc107;
    background-color: #fff8e5;
    color: #856404;
}

.alert.info {
    border-left-color: #17a2b8;
    background-color: #e5f6f9;
    color: #0c5460;
}

/* ===== ALERTA FLUTUANTE ===== */
.alert-floating {
    position: fixed;
    top: 20px;
    right: 20px;
    width: auto;
    max-width: 320px;
    z-index: 9999;
}

/* ===== DARK MODE ===== */
html[data-color-scheme="dark"] .alert {
    background-color: #1f1f1f;
    color: #e0e0e0;
}

/* Dark - cores */
html[data-color-scheme="dark"] .alert.success {
    border-left-color: #4ade80;
    background-color: #122d1a;
    color: #d1fae5;
}

html[data-color-scheme="dark"] .alert.danger {
    border-left-color: #f87171;
    background-color: #2d1212;
    color: #fee2e2;
}

html[data-color-scheme="dark"] .alert.warning {
    border-left-color: #facc15;
    background-color: #2d2612;
    color: #fef3c7;
}

html[data-color-scheme="dark"] .alert.info {
    border-left-color: #38bdf8;
    background-color: #12232d;
    color: #cffafe;
}

/* Animação */
@keyframes slideIn {
  from {
    transform: translateY(-15px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}


.modal-alert {
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 0.95rem;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-alert.success {
    background-color: #e6f9f0;
    color: #157347;
    border-color: #b6e4ce;
}

.modal-alert.error {
    background-color: #fdecea;
    color: #a71d2a;
    border-color: #f5c6cb;
}

.modal-alert.warning {
    background-color: #fff8e5;
    color: #856404;
    border-color: #ffeeba;
}

.modal-alert.info {
    background-color: #e7f3fe;
    color: #084298;
    border-color: #b8daff;
}

.modal-alert .icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.error-bar {
  background-color: #f44336;
  color: #fff;
  padding: 16px 20px;
  border-radius: 8px;
  font-size: 14px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin: 16px 0 32px 0;
  position: relative;
  animation: slideIn 0.3s ease-out;
}

/* Ícone e título */
.error-bar-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.error-bar-header i {
  margin-right: 8px;
  font-size: 18px;
}

/* Lista de erros */
.error-bar ul {
  margin: 0;
  padding-left: 20px;
}

/* Botão de fechar */
.error-bar .btn-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
}

/* Popup download all creatives */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: block;
    z-index: -1;
    transition: opacity 1s ease;
}

.download-popup {
    position: fixed;
    text-align: center;
    bottom: 0;
    left: 50%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-color);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    opacity: 0;
    min-width: 400px;
    animation: slideUp 0.7s ease-in forwards;
}

.download-popup.closing {
    animation: slideDown 0.5s ease-out forwards;
}

.popup-overlay.show {
    display: block;
    opacity: 1;
}

.popup-content {
    padding: 15px 45px;
    background-color: --var(--danger);
    color: #fff;
    font-size: 17px;
    display: block;
    text-align: center;
}

.popup-header h4 {
    margin: 0;
    color: #fff;
    font-weight: 600;
}

.close-popup {
    position: absolute;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    top: 10px;
    right: 10px;
    background: transparent;
}

.close-popup:hover {
    background: var(--border-color);
    color: #fff;
}

.popup-body {
    padding: 20px 24px 24px;
}

.popup-body p {
    margin-bottom: 20px;
    color: var(--text);
    font-size: 16px;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.selected-count {
    font-weight: 600;
    color: #007bff;
}

.error-bar .btn-close:hover {
  color: #ddd;
}

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-30px);
    }
    60% {
        transform: translateY(-15px);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes alert-timer {
    0% {
        stroke-dashoffset: -170;
        stroke-dasharray: 250;
        transform: scale(1);
    }
    88%, 90% {
        stroke-dashoffset: -0;
        stroke-dasharray: 250;
        transform: scale(1);
    }
    100%, 94% {
        stroke-dashoffset: -0;
        stroke-dasharray: 250;
        transform: scale(1.5);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes alert {
    0%, 30% {
        max-width: 60px;
        opacity: 0;
        transform: translateY(-100px);

    }
    30% {
        opacity: 1;
        max-width: 60px;
        transform: translateY(0);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
        max-width: 600px;
    }
}

/* Responsividade para mobile */
@media (max-width: 576px) {
    .alert {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }

    .alert .btn-close {
        right: 0.75rem;
    }
}