/**
 * ALUPOL - Styly pro Horní informační lištu & Akční Pop-up okno
 * Moderní, responzivní design ladící s vizuální identitou Alupol
 */

/* =============================================================================
   1. HORNÍ INFORMAČNÍ LIŠTA (TOP NOTICE BAR)
   ============================================================================= */
.alupol-top-notice-bar {
  width: 100%;
  position: relative;
  z-index: 1050;
  color: #FFFFFF;
  font-family: 'Plus Jakarta Sans', var(--font-primary, sans-serif);
  font-size: 0.925rem;
  line-height: 1.45;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.35s ease;
  overflow: hidden;
}

.alupol-top-notice-bar.is-hidden {
  max-height: 0 !important;
  opacity: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  margin: 0 !important;
  pointer-events: none;
}

/* Barevná schémata lišty */
.alupol-top-notice-bar.style-holiday {
  background: linear-gradient(135deg, #D97706 0%, #B45309 50%, #92400E 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.alupol-top-notice-bar.style-festive {
  background: linear-gradient(135deg, #064E3B 0%, #065F46 45%, #991B1B 100%);
  border-bottom: 1px solid rgba(251, 191, 36, 0.35);
}

.alupol-top-notice-bar.style-info {
  background: linear-gradient(135deg, #0071BA 0%, #005691 60%, #003F6B 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.alupol-top-notice-bar.style-alert {
  background: linear-gradient(135deg, #EA580C 0%, #C2410C 60%, #9A3412 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.alupol-top-notice-bar.style-dark {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.alupol-notice-container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  position: relative;
}

.alupol-notice-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  text-align: center;
  font-weight: 500;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.alupol-notice-icon {
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.alupol-notice-text {
  display: inline;
}

.alupol-notice-text strong {
  font-weight: 700;
  color: #FFFFFF;
}

.alupol-notice-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
  text-decoration: none;
  font-size: 0.825rem;
  font-weight: 700;
  padding: 0.3rem 0.85rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  transition: all 0.2s ease;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}

.alupol-notice-btn:hover {
  background: #FFFFFF;
  color: #0F172A;
  border-color: #FFFFFF;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.alupol-notice-close {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.alupol-notice-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-50%) rotate(90deg);
}

@media (max-width: 768px) {
  .alupol-notice-container {
    padding: 0.6rem 2.5rem 0.6rem 0.85rem;
    font-size: 0.85rem;
  }
  .alupol-notice-content {
    justify-content: flex-start;
    text-align: left;
    gap: 0.45rem;
  }
  .alupol-notice-close {
    right: 0.5rem;
  }
}

/* =============================================================================
   2. AKČNÍ MARKETINGOVÝ POP-UP MODAL
   ============================================================================= */
.alupol-promo-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.3s ease;
}

.alupol-promo-overlay.is-active {
  opacity: 1;
  visibility: visible;
}

.alupol-promo-modal {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: #FFFFFF;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 360px 1fr;
  transform: scale(0.92) translateY(16px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease;
  font-family: 'Plus Jakarta Sans', var(--font-primary, sans-serif);
}

.alupol-promo-overlay.is-active .alupol-promo-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* Režim bez obrázku nebo obrázek nahoře */
.alupol-promo-modal.layout-no-image {
  grid-template-columns: 1fr;
  max-width: 560px;
}

.alupol-promo-modal.layout-top-image {
  grid-template-columns: 1fr;
  max-width: 580px;
}

.alupol-promo-modal.layout-top-image .alupol-promo-media {
  height: 200px;
}

/* Zavírací tlačítko */
.alupol-promo-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.alupol-promo-close:hover {
  background: #E2E8F0;
  color: #0F172A;
  transform: rotate(90deg);
}

/* Levý sloupec s obrázkem */
.alupol-promo-media {
  position: relative;
  background-color: #0F172A;
  overflow: hidden;
  display: flex;
  align-items: stretch;
}

.alupol-promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.alupol-promo-media-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.15) 0%, rgba(15, 23, 42, 0.75) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  color: #FFFFFF;
}

.alupol-promo-media-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(4px);
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  align-self: flex-start;
  margin-bottom: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.alupol-promo-media-quote {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
  color: #F8FAFC;
}

/* Pravý sloupec s obsahem / formulářem */
.alupol-promo-body {
  padding: 2.25rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-height: 90vh;
  overflow-y: auto;
}

.alupol-promo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0071BA;
  background: #EBF5FF;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  margin-bottom: 0.75rem;
  align-self: flex-start;
  border: 1px solid rgba(0, 113, 186, 0.15);
}

.alupol-promo-title {
  font-size: 1.55rem;
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
  margin: 0 0 0.5rem 0;
  letter-spacing: -0.02em;
}

.alupol-promo-subtitle {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 1.35rem 0;
}

/* Formulář v popupu */
.alupol-promo-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.alupol-popup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.alupol-popup-grid.full-width {
  grid-template-columns: 1fr;
}

.alupol-popup-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
}

.alupol-popup-label {
  font-size: 0.825rem;
  font-weight: 600;
  color: #334155;
  display: flex;
  justify-content: space-between;
}

.alupol-popup-label span.req {
  color: #EF4444;
  margin-left: 2px;
}

.alupol-popup-input,
.alupol-popup-select,
.alupol-popup-textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 0.925rem;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  background: #F8FAFC;
  color: #0F172A;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
}

.alupol-popup-input:focus,
.alupol-popup-select:focus,
.alupol-popup-textarea:focus {
  outline: none;
  background: #FFFFFF;
  border-color: #0071BA;
  box-shadow: 0 0 0 3px rgba(0, 113, 186, 0.18);
}

.alupol-popup-textarea {
  resize: vertical;
  min-height: 60px;
}

.alupol-popup-btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.85rem 1.5rem;
  background: linear-gradient(135deg, #0071BA 0%, #005691 100%);
  color: #FFFFFF;
  border: none;
  border-radius: 10px;
  font-size: 0.975rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 113, 186, 0.35);
  margin-top: 0.35rem;
}

.alupol-popup-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 113, 186, 0.45);
  background: linear-gradient(135deg, #0084DB 0%, #0067AE 100%);
}

.alupol-popup-btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* Režim Banner (čistý proklik) */
.alupol-popup-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.95rem 1.75rem;
  background: linear-gradient(135deg, #0071BA 0%, #005691 100%);
  color: #FFFFFF;
  text-decoration: none;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(0, 113, 186, 0.35);
  text-align: center;
}

.alupol-popup-banner-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 113, 186, 0.45);
}

.alupol-popup-privacy {
  font-size: 0.75rem;
  color: #64748B;
  text-align: center;
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.alupol-popup-privacy a {
  color: #0071BA;
  text-decoration: underline;
}

/* Chybové hlášení */
.alupol-popup-error {
  display: none;
  background: #FEF2F2;
  border: 1px solid #FCA5A5;
  color: #991B1B;
  font-size: 0.85rem;
  padding: 0.6rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  text-align: left;
}

/* Děkovný stav po odeslání */
.alupol-popup-success {
  display: none;
  text-align: center;
  padding: 1.5rem 0.5rem;
  animation: alupolFadeUp 0.4s ease forwards;
}

@keyframes alupolFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alupol-popup-success-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  background: #DCFCE7;
  color: #16A34A;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.2);
}

.alupol-popup-success-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0F172A;
  margin: 0 0 0.5rem;
}

.alupol-popup-success-text {
  font-size: 0.95rem;
  color: #475569;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.alupol-popup-btn-dismiss {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.75rem;
  background: #F1F5F9;
  color: #334155;
  border: 1px solid #CBD5E1;
  border-radius: 10px;
  font-size: 0.925rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.alupol-popup-btn-dismiss:hover {
  background: #E2E8F0;
  color: #0F172A;
}

/* Barevná témata pop-upu */
/* 1. Zlaté / Luxusní */
.alupol-promo-modal.theme-gold_luxury .alupol-promo-badge {
  background: #FEF3C7;
  color: #B45309;
  border-color: rgba(180, 83, 9, 0.2);
}
.alupol-promo-modal.theme-gold_luxury .alupol-popup-btn-submit,
.alupol-promo-modal.theme-gold_luxury .alupol-popup-banner-cta {
  background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
  box-shadow: 0 4px 14px rgba(217, 119, 6, 0.35);
}
.alupol-promo-modal.theme-gold_luxury .alupol-popup-btn-submit:hover:not(:disabled),
.alupol-promo-modal.theme-gold_luxury .alupol-popup-banner-cta:hover {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  box-shadow: 0 6px 20px rgba(217, 119, 6, 0.45);
}
.alupol-promo-modal.theme-gold_luxury .alupol-popup-input:focus,
.alupol-promo-modal.theme-gold_luxury .alupol-popup-select:focus,
.alupol-promo-modal.theme-gold_luxury .alupol-popup-textarea:focus {
  border-color: #D97706;
  box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.2);
}

/* 2. Sváteční červené */
.alupol-promo-modal.theme-festive_red .alupol-promo-badge {
  background: #FEE2E2;
  color: #B91C1C;
  border-color: rgba(185, 28, 28, 0.2);
}
.alupol-promo-modal.theme-festive_red .alupol-popup-btn-submit,
.alupol-promo-modal.theme-festive_red .alupol-popup-banner-cta {
  background: linear-gradient(135deg, #DC2626 0%, #991B1B 100%);
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}
.alupol-promo-modal.theme-festive_red .alupol-popup-btn-submit:hover:not(:disabled),
.alupol-promo-modal.theme-festive_red .alupol-popup-banner-cta:hover {
  background: linear-gradient(135deg, #EF4444 0%, #B91C1C 100%);
  box-shadow: 0 6px 20px rgba(220, 38, 38, 0.45);
}
.alupol-promo-modal.theme-festive_red .alupol-popup-input:focus,
.alupol-promo-modal.theme-festive_red .alupol-popup-select:focus,
.alupol-promo-modal.theme-festive_red .alupol-popup-textarea:focus {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* 3. Tmavé / Sleek Dark */
.alupol-promo-modal.theme-dark_sleek {
  background: #0F172A;
  color: #FFFFFF;
}
.alupol-promo-modal.theme-dark_sleek .alupol-promo-title {
  color: #FFFFFF;
}
.alupol-promo-modal.theme-dark_sleek .alupol-promo-subtitle {
  color: #94A3B8;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-label {
  color: #CBD5E1;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-input,
.alupol-promo-modal.theme-dark_sleek .alupol-popup-select,
.alupol-promo-modal.theme-dark_sleek .alupol-popup-textarea {
  background: #1E293B;
  border-color: #334155;
  color: #F8FAFC;
}
.alupol-promo-modal.theme-dark_sleek .alupol-promo-close {
  background: #1E293B;
  border-color: #334155;
  color: #CBD5E1;
}
.alupol-promo-modal.theme-dark_sleek .alupol-promo-close:hover {
  background: #334155;
  color: #FFFFFF;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-btn-dismiss {
  background: #1E293B;
  border-color: #334155;
  color: #CBD5E1;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-btn-dismiss:hover {
  background: #334155;
  color: #FFFFFF;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-success-title {
  color: #FFFFFF;
}
.alupol-promo-modal.theme-dark_sleek .alupol-popup-success-text {
  color: #94A3B8;
}

/* Spinner pro načítání */
.alupol-popup-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: alupolSpin 0.7s linear infinite;
}

@keyframes alupolSpin {
  to { transform: rotate(360deg); }
}

/* Responsivita pro mobily a tablety */
@media (max-width: 820px) {
  .alupol-promo-modal {
    grid-template-columns: 1fr;
    max-width: 520px;
    max-height: 92vh;
    overflow-y: auto;
  }
  .alupol-promo-media {
    height: 160px;
  }
  .alupol-promo-body {
    padding: 1.5rem 1.25rem 1.5rem;
  }
  .alupol-promo-title {
    font-size: 1.3rem;
  }
  .alupol-popup-grid {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }
}
