﻿/* ==========================================================================
   Toastr Notification Component - UniCredit Modern Theme (Figma)
   ========================================================================== */

#toast-container {
  position: fixed !important;
  z-index: 999999 !important;
  pointer-events: none;
}

#toast-container * {
  box-sizing: border-box;
}

#toast-container > div {
  pointer-events: auto;
}

/* Pozycje kontenera */
.toast-top-right {
  top: 20px !important;
  right: 20px !important;
}

.toast-top-left {
  top: 20px !important;
  left: 20px !important;
}

.toast-bottom-right {
  bottom: 20px !important;
  right: 20px !important;
}

.toast-bottom-left {
  bottom: 20px !important;
  left: 20px !important;
}

.toast-top-center {
  top: 20px !important;
  right: 0 !important;
  left: 0 !important;
  width: 100%;
}

.toast-bottom-center {
  bottom: 20px !important;
  right: 0 !important;
  left: 0 !important;
  width: 100%;
}

.toast-top-full-width {
  top: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100%;
}

.toast-bottom-full-width {
  bottom: 0 !important;
  right: 0 !important;
  left: 0 !important;
  width: 100%;
}

#toast-container.toast-top-center > div,
#toast-container.toast-bottom-center > div {
  width: 380px;
  margin: 0 auto 12px;
}

#toast-container.toast-top-full-width > div,
#toast-container.toast-bottom-full-width > div {
  width: 96%;
  margin: 8px auto;
}

/* Karta Toast (Figma) */
#toast-container > div,
.toast {
  position: relative !important;
  overflow: hidden !important;
  margin: 0 0 12px !important;
  padding: 14px 40px 14px 54px !important;
  width: 380px !important;
  max-width: calc(100vw - 32px) !important;
  min-height: 64px !important;
  border-radius: 8px !important;
  border: 1px solid #e2e8f0 !important;
  background-color: #ffffff !important;
  color: #1e293b !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04) !important;
  opacity: 1 !important;
  cursor: default !important;
  background-position: 18px 14px !important;
  background-repeat: no-repeat !important;
  background-size: 22px 22px !important;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

#toast-container > div:hover {
  box-shadow: 0 14px 28px -4px rgba(0, 0, 0, 0.12), 0 10px 12px -6px rgba(0, 0, 0, 0.06) !important;
}

/* Lewy pasek akcentowy o zaokrąglonych krawędziach */
#toast-container > div::before,
.toast::before {
  content: "" !important;
  position: absolute !important;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 4px !important;
  border-top-left-radius: 8px !important;
  border-bottom-left-radius: 8px !important;
}

/* 1. Success (Zielony) */
#toast-container > .toast-success::before,
.toast-success::before {
  background-color: #16a34a !important;
}

#toast-container > .toast-success,
.toast-success {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E") !important;
}

/* 2. Error (Czerwony) */
#toast-container > .toast-error::before,
.toast-error::before {
  background-color: #dc2626 !important;
}

#toast-container > .toast-error,
.toast-error {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") !important;
}

/* 3. Warning (Pomarańczowy) */
#toast-container > .toast-warning::before,
.toast-warning::before {
  background-color: #f59e0b !important;
}

#toast-container > .toast-warning,
.toast-warning {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23f59e0b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z'/%3E%3Cline x1='12' y1='9' x2='12' y2='13'/%3E%3Cline x1='12' y1='17' x2='12.01' y2='17'/%3E%3C/svg%3E") !important;
}

/* 4. Info (Niebieski UniCredit) */
#toast-container > .toast-info::before,
.toast-info::before {
  background-color: #004094 !important;
}

#toast-container > .toast-info,
.toast-info {
  background-color: #ffffff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%23004094' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='16' x2='12' y2='12'/%3E%3Cline x1='12' y1='8' x2='12.01' y2='8'/%3E%3C/svg%3E") !important;
}

/* Tytuł i Treść */
.toast-title {
  font-size: 13.5px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  line-height: 1.35 !important;
  margin-bottom: 2px !important;
}

.toast-message {
  font-size: 12.5px !important;
  font-weight: 400 !important;
  color: #64748b !important;
  line-height: 1.45 !important;
  word-wrap: break-word !important;
}

.toast-message a,
.toast-message label {
  color: #004094 !important;
}

.toast-message a:hover {
  color: #002b66 !important;
  text-decoration: underline !important;
}

/* Przycisk zamykania (krzyżyk) */
.toast-close-button {
  position: absolute !important;
  top: 10px !important;
  right: 12px !important;
  width: 24px !important;
  height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #94a3b8 !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  opacity: 0.8 !important;
  text-shadow: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: color 0.15s ease, opacity 0.15s ease;
}

.toast-close-button:hover,
.toast-close-button:focus {
  color: #0f172a !important;
  opacity: 1 !important;
  background: transparent !important;
  outline: none !important;
}

button.toast-close-button {
  -webkit-appearance: none;
}

/* Pasek postępu czasu życia powiadomienia */
.toast-progress {
  position: absolute !important;
  left: 0 !important;
  bottom: 0 !important;
  height: 3px !important;
  opacity: 0.8 !important;
}

#toast-container > .toast-success .toast-progress {
  background-color: #16a34a !important;
}

#toast-container > .toast-error .toast-progress {
  background-color: #dc2626 !important;
}

#toast-container > .toast-warning .toast-progress {
  background-color: #f59e0b !important;
}

#toast-container > .toast-info .toast-progress {
  background-color: #004094 !important;
}

/* RWD */
@media (max-width: 480px) {
  #toast-container > div,
  .toast {
    width: calc(100vw - 24px) !important;
    padding: 12px 36px 12px 48px !important;
    background-position: 14px 12px !important;
  }

  .toast-top-right,
  .toast-top-left {
    top: 12px !important;
    right: 12px !important;
    left: 12px !important;
  }
}

