:root{
  --cp-red:#8b0000;
  --cp-red-dark:#5f0000;
  --cp-bg:#f6f6f6;
  --cp-card:#ffffff;
  --cp-border:#e5e5e5;
  --cp-text:#111;
  --cp-muted:#666;
  --cp-radius:14px;
}

/* ===== ASTRA: portal ma być pełną treścią, bez sidebar-kolumny ===== */
#primary.content-area{
  width: 100% !important;
  max-width: none !important;
  float: none !important;
  margin: 0 !important;
}
#secondary, .sidebar-main{ display:none !important; }
.site-content .ast-container{ max-width:none !important; width:100% !important; }

/* ===== PORTAL: wrapper (bez zależności od body.cp-portal) ===== */
.cp-page{
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 32px;
  box-sizing: border-box;
}

.cp-dashboard{
  width: 100%;
  
  padding: 40px 0 60px;
}

.cp-container{ width: 100%; }

/* ===== UI ===== */
.cp-page-title{
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 32px;
  color: var(--cp-text);
}

.cp-top-grid{
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* ===== UKŁAD: 2 karty na górze (Twoje dane + Faktura) ===== */
.cp-top-duo{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px){
  .cp-top-duo{ grid-template-columns: 1fr; }
}


.cp-side-stack{
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.cp-box{
  background: var(--cp-card);
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 24px;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
  margin-top: 25px;
}

.cp-box h3{
  margin: 0 0 18px;
  font-size: 26px;
  font-weight: 900;
}

.cp-field{ margin-bottom: 14px; }
.cp-field strong{
  display:block;
  font-size:14px;
  color:var(--cp-red);
}
.cp-field span{
  font-size:17px;
  color:var(--cp-muted);
}

.cp-btn{
  margin-top: 18px;
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  background: var(--cp-red);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.cp-btn:hover{ background:var(--cp-red-dark); }

.cp-btn--ghost{ background:#eee; color:#111; }
.cp-btn--ghost:hover{ background:#ddd; }

@media (max-width: 900px){
  .cp-page{ padding: 16px; }
  .cp-top-grid{ grid-template-columns: 1fr; }
}


/* ===== CP: wymuś centrowanie contentu Asty tylko na portalu ===== */

/* 1) najczęstszy przypadek: Astra robi układ flex z sidebarami */
body.cp-portal .site-content .ast-container,
body.cp-portal .site-content .ast-container .content-area,
body.cp-portal .site-content .ast-container #primary{
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
}

/* 2) usuń sidebar oraz rezerwację miejsca na niego */
body.cp-portal #secondary,
body.cp-portal .sidebar-main{
  display: none !important;
}

body.cp-portal .site-content .ast-container{
  display: block !important;       /* zabija flex/grid jeśli Astra go używa */
}

/* 3) i dopiero teraz centrowanie Twojego wrappera */
body.cp-portal .cp-page{
  width: min(1440px, 100%);
  margin-left: auto !important;
  margin-right: auto !important;
}


/* =========================
   CHAT – KOMPAKTOWE BĄBELKI
   ========================= */

/* wiersz */
.cp-msg{
  display: flex;
  width: 100%;
  margin-bottom: 6px;
}

/* wyrównanie */
.cp-msg.is-me{ justify-content: flex-end; }
.cp-msg.is-them{ justify-content: flex-start; }

/* bąbel */
.cp-bubble{
  max-width: 68%;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* TY */
.cp-msg.is-me .cp-bubble{
  background: var(--cp-red);
  color: #fff;
  border-top-right-radius: 6px;
}

/* OPIEKUN */
.cp-msg.is-them .cp-bubble{
  background: #fff;
  border-top-left-radius: 6px;
}

/* meta (autor + data) */
.cp-meta{
  font-size: 11px;
  font-weight: 600;
  opacity: .75;
  margin-bottom: 4px;
  line-height: 1;
}

/* tekst */
.cp-text{
  font-size: 15px;
  line-height: 1.4;
  word-break: break-word;
}

/* mobile */
@media (max-width: 600px){
  .cp-bubble{
    max-width: 85%;
    padding: 8px 10px;
  }
}

/* =========================
   CHAT – UKŁAD 2 KOLUMNY
   ========================= */


   /* =========================
   CHAT – WYŚRODKOWANY MODUŁ
   ========================= */

.cp-chat-wrapper{
  max-width: 980px;
  margin: 56px auto 0;              /* centrowanie całego modułu */
  display: grid;
  grid-template-columns: minmax(360px, 1fr) 360px;
  gap: 22px;
  align-items: start;
}

/* wiadomości: ~5 szt. i scroll */
.cp-client-chat-box{
  max-height: 260px;                /* dostrój: 240-320px */
  overflow-y: auto;
}

/* formularz obok */
.cp-chat-form{
  margin-top: 0;
}

/* mobile: pod spodem */
@media (max-width: 900px){
  .cp-chat-wrapper{
    grid-template-columns: 1fr;
  }
  .cp-client-chat-box{
    max-height: 320px;
  }
}


/* główny układ: chat po lewej, formularz po prawej */
.cp-chat-layout{
  display: grid;
  grid-template-columns: minmax(320px, 520px) minmax(320px, 420px);
  gap: 18px;
  align-items: start;
  justify-content: end;          /* całość trzyma się prawej strony jak na screenie */
}

/* węższy chat-box + wysokość ~5 wiadomości (scroll) */
.cp-client-chat-box{
  max-height: 260px;             /* OK na ~5 krótkich wiadomości; dostroisz w razie czego */
  overflow-y: auto;
  padding: 14px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: #fbfbfb;
  max-width: 1400px;
}

/* formularz obok */
.cp-chat-form{
  margin-top: 0;
  padding: 14px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: #fff;
  max-width: 1400px;
}

/* textarea mniej “gigant” */
.cp-chat-textarea{
  min-height: 170px;
}

/* label wyrównany, nie pod spodem */
.cp-chat-label{
  margin-bottom: 10px;
  font-weight: 900;
  color: var(--cp-red);
}

/* przycisk na dół po prawej */
.cp-chat-actions{
  display:flex;
  justify-content:flex-end;
  margin-top: 10px;
}

/* mobile: wraca pod spód */
@media (max-width: 900px){
  .cp-chat-layout{
    grid-template-columns: 1fr;
    justify-content: stretch;
  }
  .cp-client-chat-box{
    max-height: 320px;
  }
  .cp-chat-textarea{
    min-height: 120px;
  }
}



/* =========================
   GALERIE – SEKCJE
   ========================= */

/* większy odstęp OD GÓRY – po danych */
.cp-top-grid + .cp-gallery-section{
  margin-top: 56px;
}

/* odstępy między galeriami */
.cp-gallery-section{
  margin-bottom: 48px;
}

/* nagłówki galerii */
.cp-gallery-section h3{
  margin-bottom: 18px;
  font-size: 24px;
  font-weight: 900;
}

/* kontener miniatur */
.cp-gallery-section > div{
  display: flex;
  flex-wrap: wrap;
  gap: 14px;              /* większy oddech */
}

/* pojedyncza miniatura */
.cp-gallery-section a{
  width: 140px;
  height: 90px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--cp-border);
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.cp-gallery-section a:hover{
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,.12);
}

.cp-gallery-section img{
  width: 100%;
  height: 100%;
  object-fit: cover;
}


/* =========================
   CHAT – FINALNY LAYOUT
   ========================= */

/* cały moduł czatu jako karta i na środku */
.cp-chat-wrapper{
  max-width: 1600px;
  margin: 30px auto 0;
  padding: 18px;
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);

  display: grid !important;
  grid-template-columns: minmax(360px, 1fr) 360px !important;
  gap: 18px !important;
  align-items: start;
}

/* chat box ma być w lewej kolumnie */
.cp-chat-wrapper .cp-client-chat-box{
  max-height: 260px;
  overflow-y: auto;
  margin: 0 !important;
}

/* form ma być w prawej kolumnie (nie pod spodem) */
.cp-chat-wrapper .cp-chat-form{
  margin: 0 !important;
}

/* mobile: pod spodem */
@media (max-width: 900px){
  .cp-chat-wrapper{
    grid-template-columns: 1fr !important;
  }
  .cp-chat-wrapper .cp-client-chat-box{
    max-height: 320px;
  }
}


/* LEWA kolumna: Twoje dane + Transport obok siebie */
.cp-left-split{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 32px;
  align-items: stretch;
}

/* mobilnie: jeden pod drugim */
@media (max-width: 900px){
  .cp-left-split{
    grid-template-columns: 1fr;
    gap: 24px;
  }
}


/* =========================
   WP-LOGIN (wp-login.php) – MODERN LOOK
   ========================= */

body.login{
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(139,0,0,.10), transparent 60%),
    radial-gradient(900px 500px at 85% 20%, rgba(0,0,0,.06), transparent 55%),
    var(--cp-bg);
}

body.login #login{
  width: min(420px, 92vw);
  padding: 28px 0 0;
}

body.login #loginform,
body.login #registerform,
body.login #lostpasswordform{
  border: 1px solid rgba(0,0,0,.07);
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.10);
  padding: 26px;
}

body.login .button-primary{
  background: var(--cp-red) !important;
  border-color: var(--cp-red) !important;
  box-shadow: 0 10px 24px rgba(139,0,0,.22) !important;
  border-radius: 999px !important;
  font-weight: 800;
}

body.login .button-primary:hover{
  background: var(--cp-red-dark) !important;
  border-color: var(--cp-red-dark) !important;
}

body.login input[type="text"],
body.login input[type="password"],
body.login input[type="email"]{
  border-radius: 14px;
  padding: 10px 12px;
}

/* =========================
   BRAND BUTTON – TYLKO WTYCZKA (CP)
   ========================= */

.cp-dashboard .cp-btn,
.cp-dashboard button.cp-btn,
.cp-dashboard a.cp-btn,
.cp-dashboard input.cp-btn,
.cp-dashboard input[type="submit"].cp-btn,
.cp-dashboard input[type="button"].cp-btn{
  appearance: none;
  -webkit-appearance: none;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 14px 36px;
  min-height: 52px;

  background: #d60000;
  color: #fff !important;

  font-size: 16px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;

  border: none;
  border-radius: 999px;

  box-shadow: none;
  text-decoration: none !important;
  cursor: pointer;

  transition: background .15s ease, transform .1s ease;
}

.cp-dashboard .cp-btn:hover{
  background: #b80000;
}

.cp-dashboard .cp-btn:active{
  transform: scale(.98);
}

.cp-dashboard .cp-btn[disabled],
.cp-dashboard .cp-btn:disabled{
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

/* Wyraźny komunikat o braku auta */
.cp-no-car-notice{
  margin: 26px 0 10px;
  padding: 18px 22px;
  border-radius: 14px;
  background: #fff5f5;
  border: 1px solid rgba(214,0,0,.18);
}

.cp-no-car-title{
  font-weight: 900;
  font-size: 18px;
  color: #d60000;
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.cp-no-car-text{
  font-weight: 700;
  color: #333;
  line-height: 1.45;
}


/* ===== ALERTY / WYRÓŻNIENIA ===== */
.cp-alert{
  border: 1px solid var(--cp-border);
  border-radius: var(--cp-radius);
  padding: 14px 16px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}
.cp-alert--warn{
  border-color: #d63638;
  background: #fff7f7;
}
.cp-alert-title{
  margin: 0 0 6px;
  font-weight: 900;
  color: #d63638;
}
.cp-alert-text{
  margin: 0;
  color: var(--cp-muted);
  line-height: 1.35;
}


/* ===== PROFIL: edycja inline (tytuły zostają) ===== */
.cp-row{
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.cp-row .cp-label{
  font-size: 14px;
  font-weight: 900;
  color: var(--cp-red);
}

.cp-row .cp-value{
  font-size: 16px;
  color: var(--cp-muted);
}

.cp-row input{
  width: 100%;
  max-width: 520px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cp-border);
}


/* Transport - edycja adresu */
#cp-transport-address-edit form{
  display:flex;
  gap:12px;
  align-items:center;
  margin-top:12px;
}

#cp-transport-address-edit input[type="text"]{
  flex:1;
  max-width:520px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cp-border);
}

#cp-transport-notice{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--cp-border);
  background: #fff;
}


.cp-icon-btn{
  border: 1px solid var(--cp-border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  line-height: 1;
}

.cp-transport-inline{
  display:block;
}

.cp-transport-form{
  margin-top:10px;
  display:flex;
  gap:10px;
  align-items:center;
}

.cp-transport-form input[type="text"]{
  flex:1;
  max-width:520px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cp-border);
}


/* =========================
   TRANSPORT – OŁÓWEK + AKCJE (✔ ✕)
   ========================= */

/* Ułóż "Adres dostawy" w jednym wierszu i daj miejsce na ikonę po prawej */
.cp-transport-inline{
  position: relative;
  padding-right: 52px;              /* miejsce na kółko z prawej */
}

/* OŁÓWEK: czarne kółko, biały znak, przy prawej krawędzi */
#cpTransportEditPencil{
  position: absolute;
  right: 0;
  top: 2px;                         /* dopasuj 0–6px jeśli chcesz wyżej/niżej */
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 1 !important;
  visibility: visible !important;
  transition: background .15s ease, transform .12s ease;
  z-index: 5;
}

#cpTransportEditPencil:hover{
  background: var(--cp-red, #8b0000);
  transform: scale(1.06);
}

/* Formularz edycji adresu – przyciski ✔ ✕ wyraźniejsze */
.cp-transport-form{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 6px;
}

.cp-transport-form input{
  flex: 1;
  min-width: 220px;
}

/* wspólny styl dla ikon w transporcie */
.cp-transport-form .cp-icon-btn{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: none;
  background: #111;                 /* ciemne kółko, lepszy kontrast */
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;                  /* większe ✔ ✕ */
  font-weight: 900;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
}

/* ✔ na hover lekko zielony? – jeśli wolisz oba czerwone, usuń tę regułę */
.cp-transport-form .cp-icon-btn[type="submit"]:hover{
  background: #0b7a2a;
  transform: scale(1.06);
}

/* ✕ na hover czerwone */
#cpTransportCancel:hover{
  background: var(--cp-red, #8b0000);
  transform: scale(1.06);
}

/* =========================
   TRANSPORT – NAPRAWA ✔
   ========================= */

/* przycisk zapisu (✔) */
.cp-transport-form button[type="submit"]{
  position: relative;
  background: #111;
  color: transparent; /* ukrywamy ewentualny pusty tekst */
}

/* wymuszona ikona ✔ */
.cp-transport-form button[type="submit"]::before{
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;          /* BIAŁY ✔ */
  font-size: 20px;      /* wyraźny */
  font-weight: 900;
  line-height: 1;
}

/* hover ✔ */
.cp-transport-form button[type="submit"]:hover{
  background: var(--cp-red, #8b0000);
  transform: scale(1.06);
}


/* =========================
   MODAL – PRZYCISK ZAMKNIĘCIA (X)
   ========================= */

.cp-modal-close,
.cp-lightbox-close,
.cp-gallery-close{
  position:absolute;
  top:14px;
  right:14px;
  width:48px;
  height:48px;
  border-radius:50%;
  background:#000;
  color:#fff;
  font-size:28px;
  font-weight:900;
  border:none;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
  transition:background .15s ease, transform .12s ease;
}

.cp-modal-close:hover,
.cp-lightbox-close:hover,
.cp-gallery-close:hover{
  background:var(--cp-red,#8b0000);
  transform:scale(1.08);
}



/* ===== SCROLL: prawa kolumna "Samochód" ===== */
.cp-car-scroll {
  max-height: 520px;      /* możesz zmienić np. 480 / 600 */
  overflow: auto;
  padding-right: 6px;     /* żeby pasek nie nachodził na treść */
}

.cp-car-scroll::-webkit-scrollbar {
  width: 10px;
}
.cp-car-scroll::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 10px;
}


/* ===== "Foldery" zdjęć per auto (tabs) ===== */
.cp-car-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 12px;
}

.cp-car-tab {
  border: 1px solid var(--cp-border);
  background: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
}

.cp-car-tab.is-active {
  border-color: var(--cp-red);
  color: var(--cp-red);
}

.cp-car-panel {
  display: none;
}

.cp-car-panel.is-active {
  display: block;
}

/* Twoje miniatury (jeśli masz klasę cp-thumb / cp-gallery) zostaw,
   ale dorzucamy stabilny układ i brak "skakania" */
.cp-gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px){
  .cp-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}


/* =========================================
   MULTI-AUTO SLIDER (Samochód + Zdjęcia)
========================================= */

.cp-car-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}

.cp-car-nav{
  display:flex;
  align-items:center;
  gap:10px;
}

.cp-car-btn{
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--cp-border);
  background:#fff;
  font-size:26px;
  font-weight:900;
  cursor:pointer;
  line-height:1;
}

.cp-car-btn:hover{ border-color:#ddd; }

.cp-car-counter{
  font-weight:900;
  color:var(--cp-muted);
  min-width: 110px;
  text-align:center;
}

.cp-car-slider,
.cp-gallery-slider{
  overflow:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling:touch;
  scrollbar-width: thin;
}

.cp-car-track,
.cp-gallery-track{
  display:flex;
  gap:18px;
}

.cp-car-slide,
.cp-gallery-slide{
  flex: 0 0 100%;
  scroll-snap-align:start;
}

/* =========================================
   SEKCJA "SAMOCHÓD" – 3 KOLUMNY Z SEPARATORAMI
   (jak na Twoim screenie)
========================================= */

.cp-car-sections{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 10px;
}

.cp-car-section{
  padding: 6px 26px 10px;
}

.cp-car-section + .cp-car-section{
  border-left: 1px solid rgba(0,0,0,.08);
}

.cp-subtitle{
  margin: 0 0 18px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .02em;
  text-transform: uppercase;
}

@media (max-width: 900px){
  .cp-car-sections{ grid-template-columns: 1fr; }
  .cp-car-section{ padding: 10px 0; }
  .cp-car-section + .cp-car-section{ border-left: 0; border-top: 1px solid rgba(0,0,0,.08); }
}

@media (min-width: 1100px){
  .cp-car-slide,
  .cp-gallery-slide{
    flex-basis: 100%;
  }
}

/* kropki */
.cp-car-dots{
  margin-top: 14px;
  display:flex;
  justify-content:center;
  gap:10px;
}

.cp-dot{
  width:10px;
  height:10px;
  border-radius:999px;
  border:1px solid #ddd;
  background:#fff;
  cursor:pointer;
  padding:0;
}

.cp-dot.is-active{
  background: var(--cp-red);
  border-color: var(--cp-red);
}

/* =========================================
   GALERIE – ŁADNY GRID (bez “pasków”)
========================================= */

.cp-gallery-module{
  margin-top: 32px;
}

.cp-gallery-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:16px;
  margin: 18px 0 12px;
}

.cp-gallery-head h3{
  margin:0;
}

.cp-gallery-note{
  font-size: 13px;
  color: var(--cp-muted);
  font-weight: 700;
}

.cp-gallery-grid3{
  display:grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 900px){
  .cp-gallery-grid3{
    grid-template-columns: 1fr;
  }
}

.cp-gallery-card{
  padding: 18px;
}

.cp-gallery-title{
  margin: 0 0 14px !important;
  font-size: 18px !important;
  font-weight: 900 !important;
}

/* miniatury: stabilny układ */
.cp-photo-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 1200px){ .cp-photo-grid{ grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 820px){ .cp-photo-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px){ .cp-photo-grid{ grid-template-columns: 1fr; } }

.cp-gallery-card .cp-muted{
  margin: 0;
  padding: 10px 0 4px;
}

.cp-photo-thumb{
  display:block;
  width:100%;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  overflow:hidden;
  border: 1px solid var(--cp-border);
  background: #fff;
  transition: transform .15s ease, box-shadow .15s ease;
}

.cp-photo-thumb:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(0,0,0,.12);
}

.cp-photo-thumb img{
  width:100%;
  height:100%;
  object-fit: cover;
  display:block;
}

/* =========================================
   TRANSPORT w slajdzie – dopasowanie do nowych klas
========================================= */
.cp-car-slide .cp-transport-inline{
  position: relative;
  padding-right: 52px;
}

.cp-car-slide .cp-transport-pencil{
  position: absolute;
  right: 0;
  top: 2px;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: #000;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease, transform .12s ease;
  z-index: 5;
}

.cp-car-slide .cp-transport-pencil:hover{
  background: var(--cp-red, #8b0000);
  transform: scale(1.06);
}

/* formularz */
.cp-car-slide form.cp-transport-form{
  margin-top: 10px;
  display:flex;
  gap:10px;
  align-items:center;
}

.cp-car-slide form.cp-transport-form input[type="text"]{
  flex:1;
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--cp-border);
}


/* STRZAŁKI – idealne wycentrowanie ikony w kółku */
.cp-car-arrow{
  width:44px;
  height:44px;
  border-radius:999px;
  border:1px solid var(--cp-border);
  background:#8b0000;
  color:#fff;

  display:flex;
  align-items:center;
  justify-content:center;

  font-size:28px;
  font-weight:700;
  line-height:1;           /* KLUCZOWE */
  padding:0;               /* KLUCZOWE */
  cursor:pointer;
}

/* hover */
.cp-car-arrow:hover{
  background:#5f0000;
  border-color:#5f0000;
}


/* ===== RWD FIX: nie pozwól niczemu rozpychać strony na boki ===== */
body.cp-portal{
  overflow-x: hidden;
}

/* ===== Slider samochodu: ukryj widoczny scrollbar (swipe zostaje) ===== */
.cp-car-slider,
.cp-car-track,
.cp-car-scroll{
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge legacy */
}
.cp-car-slider::-webkit-scrollbar,
.cp-car-track::-webkit-scrollbar,
.cp-car-scroll::-webkit-scrollbar{
  display: none;                  /* Chrome/Safari */
  height: 0;
}

/* ===== Strzałki: idealne wyśrodkowanie ikony w buttonie ===== */
.cp-car-arrow,
.cp-car-arrow button,
.cp-car-nav button{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 !important;
  line-height: 1 !important;
}

/* Jeśli Twoje strzałki mają własną klasę (np. .cp-car-arrow) - ustaw wymiar */
.cp-car-arrow{
  width: 44px;
  height: 44px;
  border-radius: 999px;
}

/* ===== MOBILE: przenieś strzałki tak, by były widoczne i nie robiły overflow ===== */
@media (max-width: 600px){

  /* Kontener ze strzałkami (jeśli masz np. .cp-car-nav) – trzymamy w obrębie karty */
  .cp-car-nav{
    position: absolute;
    top: 14px;
    right: 14px;
    display: flex;
    gap: 10px;
    z-index: 20;
    max-width: calc(100% - 28px);
  }

  /* Same przyciski mniejsze na tel */
  .cp-car-arrow{
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
  }

  /* Gdyby strzałki były “na zewnątrz” i robiły szerokość – twardo ucinamy */
  .cp-car-box,
  .cp-car-header,
  .cp-car-section{
    overflow: hidden;
  }
}
/* ===== FAKTURA: slider jak galeria ===== */
.cp-invoice-module{
  margin-top: 24px;
}

.cp-invoice-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom: 12px;
}

.cp-invoice-note{
  color: var(--cp-muted);
  font-size: 14px;
}

.cp-invoice-slider{
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  -webkit-overflow-scrolling: touch;
}

.cp-invoice-track{
  display:flex;
  gap: 16px;
}

.cp-invoice-slide{
  flex: 0 0 100%;
  scroll-snap-align:start;
}


/* =========================================================
   TOP-DUO: Twoje dane węższe, Wiadomości szersze
   + czat pionowo (wiadomości NAD polem wpisu)
========================================================= */

.cp-top-duo{
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

/* czat w top-duo ma być kompaktowy i pionowy */
.cp-top-duo .cp-chat-wrapper{
  /* zabij wszystkie wcześniejsze "grid 2 kolumny", border, margin auto itd. */
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;

  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* okno wiadomości na górze */
.cp-top-duo .cp-client-chat-box{
  order: 1;
  max-height: 240px;      /* dostrój: 220-320px */
  overflow-y: auto;
  margin: 0 !important;
  width: 100%;
}

/* formularz POD oknem wiadomości */
.cp-top-duo .cp-chat-form{
  order: 2;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  width: 100%;
}

/* pole wpisu mniejsze, żeby wszystko się mieściło */
.cp-top-duo .cp-chat-textarea{
  min-height: 110px;      /* dostrój: 90-140px */
}

/* na mobile: jedna kolumna, bez zmian */
@media (max-width: 900px){
  .cp-top-duo{
    grid-template-columns: 1fr;
  }
  .cp-top-duo .cp-client-chat-box{
    max-height: 300px;
  }
}



/* =========================================================
   TOP-DUO – dopieszczony wygląd (Twoje dane + Wiadomości)
========================================================= */

/* daj czatowi więcej miejsca */
.cp-top-duo{
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

/* tytuły w top-duo trochę mniejsze */
.cp-top-duo .cp-box h3{
  font-size: 22px;
  margin-bottom: 14px;
}

/* "Twoje dane" – mniej pustej przestrzeni */
.cp-top-duo .cp-box{
  padding: 20px;
}

/* rzędy danych ciaśniej */
.cp-top-duo .cp-field{
  margin-bottom: 10px;
}
.cp-top-duo .cp-field span{
  font-size: 16px;
}

/* przycisk w "Twoje dane" niech nie pływa w pustce */
.cp-top-duo .cp-btn{
  margin-top: 12px;
}

/* ---- TOP-DUO: czat zawsze pionowo i kompaktowo ---- */
.cp-top-duo .cp-chat-wrapper{
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;

  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;

  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* chat box jako "karta w karcie" */
.cp-top-duo .cp-client-chat-box{
  order: 1;
  max-height: 300px;
  overflow-y: auto;

  padding: 12px !important;
  border: 1px solid var(--cp-border) !important;
  border-radius: 14px !important;
  background: #fbfbfb !important;
}

/* formularz też jako "karta w karcie" */
.cp-top-duo .cp-chat-form{
  order: 2;

  padding: 12px !important;
  border: 1px solid var(--cp-border) !important;
  border-radius: 14px !important;
  background: #fff !important;
}

/* textarea mniejsza */
.cp-top-duo .cp-chat-textarea{
  min-height: 110px;
}

/* przycisk wysyłania niech się trzyma prawej */
.cp-top-duo .cp-chat-actions{
  justify-content: flex-end;
}

/* mobile zostaje 1 kolumna */
@media (max-width: 900px){
  .cp-top-duo{
    grid-template-columns: 1fr;
  }
  .cp-top-duo .cp-client-chat-box{
    max-height: 340px;
  }
}


body.cp-portal .cp-alert--warn{
  display: none !important;
}

body.cp-portal #cp-profile-missing-alert,
body.cp-portal .cp-profile-missing-alert{
  display:none !important;
}


/* =========================================================
   TOP-DUO – FINAL: 30% Twoje dane / 70% Wiadomości
========================================================= */

.cp-top-duo{
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 0.7fr);
  gap: 32px;
  align-items: stretch;
}


/* ===== TOP-DUO: WIĘCEJ miejsca na historię czatu ===== */

.cp-top-duo .cp-client-chat-box{
  max-height: 420px;     /* ⬅ było ~240, teraz jest dużo lepiej */
  min-height: 300px;
  overflow-y: auto;

  padding: 16px;
  border-radius: 16px;
}


/* ===== TOP-DUO: mniejszy formularz pisania ===== */

.cp-top-duo .cp-chat-form{
  padding: 14px;
}

.cp-top-duo .cp-chat-textarea{
  min-height: 120px;   /* było 170+ */
}


/* ===== TOP-DUO: zwarta karta "Twoje dane" ===== */

.cp-top-duo .cp-box:first-child{
  padding: 20px;
 height: 50%;
}

.cp-top-duo .cp-box:first-child .cp-field{
  margin-bottom: 10px;
}

.cp-top-duo .cp-box:first-child .cp-btn{
  margin-top: 14px;
}
