/* ==========================================
   GŁÓWNY KONTENER DASHBOARDU
   ========================================== */
.ip-dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  margin: 0 auto;
  font-family: Montserrat, sans-serif;
}

@media (min-width: 768px) {
  .ip-dashboard-container {
    flex-direction: row; /* Układ z menu po lewej na desktopie */
  }
}

/* ==========================================
   LEWA KOLUMNA (SIDEBAR)
   ========================================== */
.ip-dashboard-sidebar {
  width: 100%;
  background-color: #f4f4f4;
  padding: 24px;
  height: fit-content;
}

@media (min-width: 768px) {
  .ip-dashboard-sidebar {
    width: 320px;
    flex-shrink: 0;
  }
}

.ip-dashboard-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.ip-dashboard-menu li {
  padding: 16px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #1e1e1e;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 0.5px solid #8d8d8d;
  transition:
    color 0.3s ease,
    background-color 0.3s ease;
}

/* .ip-dashboard-menu li:last-child {
    border-bottom: none;
} */

.ip-dashboard-menu li svg {
  color: #cccccc; /* Domyślny kolor strzałki */
  transition:
    color 0.3s ease,
    transform 0.3s ease;
}

/* Stan najechania (Hover) i Aktywny */
.ip-dashboard-menu li:hover,
.ip-dashboard-menu li.active {
  color: #c5a059; /* Złoty tekst z projektu */
}

.ip-dashboard-menu li:hover svg,
.ip-dashboard-menu li.active svg {
  transform: translateX(
    4px
  ); /* Lekkie przesunięcie strzałki w prawo dla dynamiki */
}

.ip-dashboard-menu li:hover svg path,
.ip-dashboard-menu li.active svg path {
  stroke: #c5a059; /* Złota strzałka */
}

/* ==========================================
   PRAWA KOLUMNA (CONTENT)
   ========================================== */

/* WARIANTY PRZYCISKÓW */
.ip-btn-primary {
  background-color: #c5a059; /* Kolor musztardowy/złoty z Figmy */
  color: #050609;
}

.ip-btn-primary:hover,
.ip-btn-primary:focus,
.ip-btn-primary:active {
  background-color: #c5a059 !important; /* Utrzymanie koloru przy hover */
  color: #ffffff !important; /* Zmiana koloru tekstu na biały przy hover */
  /* Skorygowany, miękki efekt Glow */
  box-shadow:
    0px 0px 15px 0px rgba(109, 160, 239, 0.5),
    0px 0px 25px 4px rgba(252, 245, 223, 0.25);
}

.ip-tab-container {
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  gap: 16px;
}

.ip-dashboard-content {
  flex-grow: 1;
  background-color: #ffffff;
}

/* Zakładki (Ukrywanie i Pokazywanie) */
.ip-tab-pane {
  display: none;
  opacity: 0;
  transform: translateY(10px); /* Początkowa pozycja dla animacji */
}

.ip-tab-pane.active {
  display: block;
  animation: slideUpFade 0.4s ease forwards;
}

@keyframes slideUpFade {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Nagłówki sekcji (Header) */
.ip-tab-header {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ip-tab-header h2 {
  color: #1e1e1e;
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.ip-tab-header p {
  color: #8d8d8d;
  font-size: 16px;
  font-weight: 400;
  margin: 0;
}

/* Obszar roboczy pod nagłówkiem */
.ip-tab-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px;
  border-top: 0.5px solid #8d8d8d;
}

.ip-tab-body form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ip-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px; /* Odstęp etykiety od pola */
}

.ip-label {
  color: #1e1e1e;
  font-size: 16px;
  font-weight: 400;
  font-family: Montserrat, sans-serif;
}

/* POLA TEKSTOWE (INPUTS) */
.ip-input {
  width: 100%;
  padding: 12px !important;
  background-color: #ffffff;
  border: 1px solid #00000040 !important;
  border-radius: 4px !important;
  font-size: 16px;
  font-family: Montserrat, sans-serif;
  font-weight: 600;
  color: #1e1e1e;
  line-height: 100%;
  transition: border-color 0.3s ease !important;
}

.ip-input:focus {
  outline: none;
  border-color: #c5a059 !important; /* Delikatny akcent po kliknięciu w pole */
}

.ip-input::placeholder {
  color: #1e1e1e80;
  opacity: 1;
  font-weight: 300;
}

/* ==========================================
   FORMULARZE: INPUT Z OCZKIEM
   ========================================== */
.ip-input-wrapper {
  position: relative;
  width: 100%;
}

.ip-input-wrapper .ip-input {
  padding-right: 40px !important; /* Robimy miejsce na ikonkę oczka */
}

.ip-toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.ip-toggle-password:hover {
  opacity: 1;
}

/* ==========================================
   FORMULARZE: PRZYCISK
   ========================================== */
#ip-form-change-password .ip-btn,
#ip-form-account-details .ip-btn {
  align-self: flex-start; /* Przycisk nie rozciąga się, zajmuje tylko tyle ile potrzebuje tekst */
  padding: 12px 24px;
}

/* ==========================================
   FORMULARZE: KONTENERY I SIATKI (GRIDS)
   ========================================== */

/* 1. Imię i Nazwisko (Pół na pół) */
.ip-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* 2. Ulica i numery (Ulica szeroka na 60%, numery po 20%) */
.ip-grid-3 {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr;
  gap: 16px;
}

/* 3. Kod pocztowy i Miasto (Kod krótki na 25%, miasto na 75%) */
.ip-grid-zip-city {
  display: grid;
  grid-template-columns: 1fr 3fr;
  gap: 16px;
}

/* 4. Numer telefonu z flagą */
.ip-grid-prefix {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
}

/* Widok dla telefonów komórkowych (wszystko w jednej kolumnie) */
@media (max-width: 767px) {
  .ip-grid-2,
  .ip-grid-3,
  .ip-grid-zip-city {
    grid-template-columns: 1fr;
  }
}

/* ==========================================
   TOM SELECT - WYGLĄD DOPASOWANY DO FORMULARZA
   ========================================== */

/* 1. Główny pojemnik (to, co widzi użytkownik przed kliknięciem) */
.ts-wrapper .ts-control {
  width: 100%;
  padding: 12px !important; /* Odpowiada paddingowi .ip-input */
  background-color: #ffffff !important;
  border: 1px solid #00000040 !important;
  border-radius: 4px !important;
  font-size: 16px !important;
  font-family: Montserrat, sans-serif !important;
  color: #1e1e1e !important;
  line-height: 100% !important;
  transition: border-color 0.3s ease !important;
  box-shadow: none !important;
  min-height: auto !important;
  background-image: none !important; /* Usunięcie domyślnej strzałki, dodamy własną w CSS */
}

/* 2. Tekst aktualnie wybranego elementu */
.ts-wrapper .ts-control .item {
  color: #1e1e1e !important;
  font-weight: 600 !important; /* Pogrubienie wybranego tekstu tak jak w inputach */
  align-content: center !important;
}

/* 3. Stan po kliknięciu (Focus - złota ramka) */
.ts-wrapper.focus .ts-control {
  border-color: #c5a059 !important;
  box-shadow: none !important;
  outline: none !important;
  background-image: none !important; /* Usunięcie strzałki podczas focus, żeby nie kolidowała z ramką */
}

/* 4. Usunięcie natywnej strzałki i zastąpienie prostym trójkątem */
.ts-wrapper.single .ts-control::after {
  border-color: #1e1e1e transparent transparent transparent !important;
  right: 16px !important;
}

/* 5. Pojemnik z rozwijaną listą */
.ts-wrapper .ts-dropdown {
  background: #ffffff;
  border: 1px solid #00000040 !important;
  border-radius: 4px !important;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15) !important;
  font-family: Montserrat, sans-serif;
  margin-top: 4px !important;
}

/* 6. Wewnętrzne pole wyszukiwarki (Search input) */
.ts-wrapper .dropdown-input-wrap {
  padding: 12px !important; /* Odstęp wyszukiwarki od krawędzi */
}

.ts-wrapper .dropdown-input {
  border: 1px solid #00000040 !important;
  border-radius: 4px !important;
  padding: 10px 12px !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 14px !important;
  font-weight: 400 !important;
  transition: border-color 0.3s ease !important;
}

.ts-wrapper .dropdown-input:focus {
  border-color: #c5a059 !important;
  box-shadow: none !important;
  outline: none !important;
}

/* 7. Pojedyncza opcja na liście (Kraj / Kierunkowy) */
.ts-wrapper .ts-dropdown .option {
  padding: 10px 16px !important;
  color: #1e1e1e;
  font-size: 15px;
  font-weight: 400;
  transition:
    background-color 0.2s ease,
    color 0.2s ease;
  cursor: pointer;
}

/* 8. Opcja po najechaniu myszką (Hover / Active) */
.ts-wrapper .ts-dropdown .option.active,
.ts-wrapper .ts-dropdown .option:hover {
  background-color: #f0f0f0 !important;
  color: #000000 !important;
}

/* 9. Modyfikacja dla numeru kierunkowego - lista otwiera się do góry, żeby nie ucinać strony */
.ip-grid-prefix .ts-wrapper .ts-dropdown {
  top: auto !important;
  bottom: 100% !important;
  margin-top: 0 !important;
  margin-bottom: 4px !important;
  box-shadow: 0 -10px 20px rgba(0, 0, 0, 0.15) !important;
}

.ts-control .items-placeholder {
  color: #1e1e1e80 !important;
  font-weight: 300 !important;
  font-family: Montserrat, sans-serif !important;
  font-size: 16px !important;
}

.ip-section-label {
  color: #1e1e1e;
  font-size: 18px;
  font-weight: 600;
}

/* ==========================================
   MOJE OGŁOSZENIA - ZAKŁADKI STATUSÓW
   ========================================== */
.ip-status-tabs {
  display: flex;
}

.ip-status-tab {
  flex: 1;
  background-color: transparent !important; /* Nadpisanie wymogów motywu WP */
  border: 1px solid #1e1e1e1a !important; /* Delikatna ramka z przezroczystością */
  border-radius: 0 !important;
  padding: 12px 20px;
  font-size: 16px;
  font-weight: 600;
  color: #1e1e1e;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.ip-status-tab:hover {
  color: #1e1e1e;
}

.ip-status-tab.active {
  background-color: #6da0ef !important; /* Niebieski akcent dla aktywnego taba */
  color: #ffffff !important; /* Biały tekst dla aktywnego taba */
  border-color: #6da0ef !important; /* Dopasowanie ramki do tła aktywnego taba */
}

/* ==========================================
   PASEK NARZĘDZI (Licznik + Sortowanie)
   ========================================== */
.ip-listings-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.ip-listings-count {
  font-size: 14px;
  color: #8d8d8d;
}
.ip-listings-count strong {
  color: #1e1e1e;
}

.ip-listings-sort {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ip-listings-sort label {
  font-size: 14px;
  font-weight: 600;
  color: #1e1e1e;
}

/* ==========================================
   SIATKA KART W PANELU (Układ kafelkowy)
   ========================================== */
.ip-listings-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(300px, 1fr)
  ); /* Automatyczne dopasowanie kolumn */
  gap: 24px;
}

/* Utrzymanie równej wysokości kart w siatce (żeby przycisk see more spadał na sam dół) */
.ip-listing-card {
  height: 100%;
}

.ip-listings-sort * .item {
  padding-right: 24px !important; /* Robimy miejsce na strzałkę */
}

/* ==========================================
   POPUP WERYFIKACJI KONTA (DASHBOARD)
   ========================================== */
.ip-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    0,
    0,
    0,
    0.75
  ); /* Półprzezroczyste tło blokujące stronę */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.ip-popup-content {
  background-color: #333333; /* Ciemne tło ze screena */
  color: #ffffff;
  padding: 50px 40px;
  border-radius: 8px;
  text-align: center;
  max-width: 450px;
  width: 90%;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
}

.ip-popup-icon {
  display: flex;
  justify-content: center;
}

.ip-popup-icon svg {
  width: 80px;
  height: 80px;
  /* Jeśli Twoje SVG jest czarne, wymuś biały kolor w CSS lub zmień środek SVG na fill="#fff" */
}

.ip-popup-title {
  font-size: 32px;
  font-weight: 600;
  margin: 0;
  color: #ffffff;
}

.ip-popup-text {
  font-size: 24px;
  font-weight: 400;
  color: #ffffff;
  margin: 0;
}

.ip-popup-btn {
  background-color: #c5a059; /* Twój złoty kolor */
  color: #1e1e1e;
  border: none;
  padding: 12px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  width: auto;
}

.ip-popup-btn:hover {
  background-color: #b08d4a; /* Ciemniejsze złoto na hover */
}

/* ==========================================
   POWIADOMIENIA I LISTA
   ========================================== */
.ip-menu-badge {
    width: 8px;
    height: 8px;
    background-color: #ff4d4d;
    border-radius: 50%;
    display: inline-block;
    margin-left: 8px;
}

.ip-notif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #E5E5E5;
    gap: 20px;
}

.ip-notif-item:last-child {
    border-bottom: none;
}

.ip-notif-text {
    font-size: 15px;
    color: #1e1e1e;
    font-weight: 400;
    display: grid;
    grid-template-columns: 8px 1fr;
    align-items: center;
    gap: 12px;
}

.ip-notif-item.unread .ip-notif-text {
    font-weight: 600;
}

.ip-notif-text::before {
    content: "";
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: transparent; 
}

.ip-notif-item.unread .ip-notif-text::before {
    background-color: #1e1e1e;
}

.ip-notif-date {
    font-size: 13px;
    color: #8d8d8d;
    white-space: nowrap;
}

/* ==========================================
   PRZEŁĄCZNIK "SWITCH" (SHOW ONLY UNREAD)
   ========================================== */
.ip-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: end;
}

.ip-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.ip-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.ip-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.ip-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.ip-switch input:checked + .ip-slider {
    background-color: #c5a059; /* Złoty IntellPlace */
}

.ip-switch input:checked + .ip-slider:before {
    transform: translateX(20px);
}

/* ==========================================
   PRZYCISK POWROTU NA MOBILCE (CZARNY PASEK)
   ========================================== */
.ip-mobile-back-btn {
  display: none; /* Domyślnie ukryty */
  background-color: #1e1e1e; /* Czarny pasek */
  color: #ffffff;
  padding: 12px 20px;
  width: 100%;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  align-items: center;
  gap: 8px;
  font-family: Montserrat, sans-serif;
  margin-bottom: 20px;
}

/* Pokaż tylko na telefonie I tylko gdy treść jest aktywna */
@media (max-width: 767px) {
  .ip-dashboard-container.mobile-show-content .ip-mobile-back-btn {
    display: flex;
  }
}

.ip-mobile-back-btn:hover {
  color: #c5a059;
}

@media (max-width: 767px) {
  /* Pokaż przycisk powrotu na telefonie */
  .ip-mobile-back-btn {
    display: flex;
  }

  /* Krok 1: Domyślnie na telefonie prawa kolumna (treść) jest ukryta, widać tylko menu */
  .ip-dashboard-content {
    display: none;
  }

  /* Krok 2: Kiedy dodamy klasę (po kliknięciu w element menu), ukrywamy menu, a pokazujemy treść */
  .ip-dashboard-container.mobile-show-content .ip-dashboard-sidebar {
    display: none;
  }

  .ip-dashboard-container.mobile-show-content .ip-dashboard-content {
    display: block;
    animation: fadeSlideIn 0.3s ease forwards;
  }

  @keyframes fadeSlideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
  }

  /* ----------------------------------------------------
     MIEJSCE NA TWOJE POPRAWKI RESPONSOTYWNE (FONT SIZES)
     Tutaj wrzucaj mniejsze czcionki dla telefonu
     ---------------------------------------------------- */
  .ip-tab-header h2 {
    /* np. font-size: 24px; */
  }

  .ip-tab-header p {
    /* np. font-size: 14px; */
  }

  .ip-section-label {
    /* np. font-size: 16px; */
  }
  
  /* i tak dalej... */
}