/* PTTK Leader Panel CSS */

.pttk-leader-panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

/* Login box */
.pttk-leader-login-box {
  max-width: 400px;
  margin: 40px auto;
}

.pttk-leader-login-box h2 {
  margin: 0 0 16px 0;
  text-align: center;
}

.pttk-leader-login-box > p {
  text-align: center;
  color: #666;
  margin-bottom: 20px;
}

.pttk-login-form .pttk-form-group {
  margin-bottom: 16px;
}

.pttk-login-form .pttk-form-group label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
}

.pttk-login-form .pttk-form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
}

.pttk-login-form .pttk-form-group input:focus {
  outline: none;
  border-color: var(--pttk-primary, #379237);
  box-shadow: 0 0 0 3px rgba(55, 146, 55, 0.1);
}

.pttk-login-form .pttk-form-actions {
  margin-top: 20px;
}

.pttk-login-form .pttk-btn {
  width: 100%;
}

/* Header */
.pttk-leader-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--pttk-primary, #379237);
}

.pttk-leader-header h2 {
  margin: 0;
  color: var(--pttk-text-heading, #0f172a);
}

.pttk-leader-user {
  font-size: 14px;
  color: #666;
}

.pttk-leader-user a {
  color: var(--pttk-primary, #379237);
  text-decoration: none;
}

.pttk-leader-user a:hover {
  text-decoration: underline;
}

/* Cards */
.pttk-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

/* Trip selector */
.pttk-leader-trips-select {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pttk-leader-trips-select select {
  flex: 1;
  max-width: 500px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  background: #fff;
}

/* Trip info */
.pttk-trip-info h3 {
  margin: 0 0 8px 0;
  color: var(--pttk-text-heading, #0f172a);
}

.pttk-trip-info p {
  margin: 0;
  color: #666;
  font-size: 14px;
}

/* Add participant form */
.pttk-add-participant h4 {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.pttk-form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.pttk-form-group {
  flex: 1;
}

.pttk-form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 6px;
}

.pttk-form-group input,
.pttk-form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.pttk-form-group input:focus,
.pttk-form-group select:focus {
  outline: none;
  border-color: var(--pttk-primary, #379237);
  box-shadow: 0 0 0 3px rgba(55, 146, 55, 0.1);
}

.pttk-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 8px;
}

.pttk-form-note {
  font-size: 13px;
  color: #888;
}

/* Buttons */
.pttk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.pttk-btn-primary {
  background: var(--pttk-primary, #379237);
  color: #fff;
}

.pttk-btn-primary:hover {
  background: var(--pttk-primary-dark, #2d7a2d);
}

.pttk-btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.pttk-btn-small {
  padding: 4px 10px;
  font-size: 12px;
  background: var(--pttk-primary, #379237);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 6px;
  display: block;
}

.pttk-btn-small:hover {
  background: var(--pttk-primary-dark, #2d7a2d);
}

/* Participants list */
.pttk-participants-list h4 {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.pttk-empty {
  color: #888;
  font-style: italic;
  text-align: center;
  padding: 30px;
}

.pttk-table-responsive {
  overflow-x: auto;
}

.pttk-participants-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pttk-participants-table th {
  text-align: left;
  padding: 12px 10px;
  background: #f8f9fa;
  font-weight: 600;
  color: #444;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
}

.pttk-participants-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.pttk-participants-table tr:hover td {
  background: #f8f9fa;
}

.pttk-participants-table .pttk-meta {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.pttk-col-name {
  min-width: 150px;
}

.pttk-col-contact a {
  color: var(--pttk-primary, #379237);
  text-decoration: none;
}

.pttk-col-contact a:hover {
  text-decoration: underline;
}

.pttk-col-notes {
  max-width: 200px;
  color: #666;
  font-size: 13px;
}

/* Badges */
.pttk-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.pttk-badge-success {
  background: #d4edda;
  color: #155724;
}

.pttk-badge-warning {
  background: #fff3cd;
  color: #856404;
}

.pttk-badge-danger {
  background: #f8d7da;
  color: #721c24;
}

/* Responsive */
@media (max-width: 768px) {
  .pttk-leader-panel {
    padding: 12px;
  }

  .pttk-leader-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .pttk-leader-trips-select {
    flex-direction: column;
    align-items: flex-start;
  }

  .pttk-leader-trips-select select {
    max-width: 100%;
    width: 100%;
  }

  .pttk-form-row {
    flex-direction: column;
    gap: 12px;
  }

  .pttk-form-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .pttk-participants-table {
    font-size: 13px;
  }

  .pttk-participants-table th,
  .pttk-participants-table td {
    padding: 8px 6px;
  }

  .pttk-col-name {
    min-width: 120px;
  }
}

/* Loading state */
.pttk-loading {
  position: relative;
  pointer-events: none;
}

.pttk-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #ddd;
  border-top-color: var(--pttk-primary, #379237);
  border-radius: 50%;
  animation: pttk-spin 0.8s linear infinite;
}

@keyframes pttk-spin {
  to { transform: rotate(360deg); }
}

/* Message alerts */
.pttk-alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin-bottom: 16px;
  font-size: 14px;
}

.pttk-alert-success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.pttk-alert-error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.pttk-alert-info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}

/* Leader header with info and actions */
.pttk-leader-info h2 {
  margin: 0 0 8px 0;
}

.pttk-leader-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.pttk-leader-name {
  font-weight: 600;
  color: #333;
}

.pttk-leader-role {
  color: #666;
  padding: 2px 10px;
  background: #f0f0f0;
  border-radius: 20px;
  font-size: 12px;
}

.pttk-leader-actions {
  display: flex;
  gap: 10px;
}

.pttk-btn-outline {
  background: transparent;
  border: 1px solid var(--pttk-primary, #379237);
  color: var(--pttk-primary, #379237);
}

.pttk-btn-outline:hover {
  background: var(--pttk-primary, #379237);
  color: #fff;
}

/* Trip info stats */
.pttk-trip-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 14px;
  color: #666;
}

.pttk-trip-stats {
  display: flex;
  gap: 20px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}

.pttk-stat {
  text-align: center;
  padding: 12px 20px;
  background: #f8f9fa;
  border-radius: 8px;
  min-width: 100px;
}

.pttk-stat-value {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: #333;
}

.pttk-stat-label {
  display: block;
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  margin-top: 4px;
}

.pttk-stat-success {
  background: #d4edda;
}

.pttk-stat-success .pttk-stat-value {
  color: #155724;
}

.pttk-stat-warning {
  background: #fff3cd;
}

.pttk-stat-warning .pttk-stat-value {
  color: #856404;
}

.pttk-trips-count {
  font-size: 13px;
  color: #888;
  margin-left: 8px;
}

.pttk-note {
  color: #666;
  font-style: italic;
  font-size: 14px;
}

/* Login widget (footer/header) */
.pttk-login-widget {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 14px;
  max-width: 100%;
}

.pttk-login-widget__user {
  font-weight: 600;
}

.pttk-login-widget__link {
  color: var(--pttk-primary, #379237);
  text-decoration: none;
}

.pttk-login-widget__link:hover {
  text-decoration: underline;
}

.pttk-login-widget__logout,
.pttk-login-widget__btn {
  background: none;
  border: 1px solid currentColor;
  padding: 4px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: inherit;
}

.pttk-login-widget__logout:hover,
.pttk-login-widget__btn:hover {
  background: var(--pttk-primary, #379237);
  border-color: var(--pttk-primary, #379237);
  color: #fff;
}

.pttk-login-widget__dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  min-width: 250px;
  z-index: 1000;
}

.pttk-login-widget--guest {
  position: relative;
}

.pttk-login-widget__dropdown input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  margin-bottom: 10px;
  font-size: 14px;
}

.pttk-login-widget__dropdown button {
  width: 100%;
  padding: 8px 12px;
  background: var(--pttk-primary, #379237);
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
}

.pttk-login-widget__dropdown button:hover {
  background: var(--pttk-primary-dark, #2d7a2d);
}

@media (max-width: 768px) {
  .pttk-login-widget {
    display: flex;
    width: 100%;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .pttk-login-widget--logged {
    flex-direction: column;
    align-items: stretch;
  }

  .pttk-login-widget__user {
    width: 100%;
  }

  .pttk-login-widget__link,
  .pttk-login-widget__logout,
  .pttk-login-widget__btn {
    width: 100%;
    text-align: center;
  }

  .pttk-login-widget__dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: auto;
    bottom: 12px;
    min-width: 0;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }
}

/* =====================================================
   LISTA CHĘTNYCH (Interested list)
   ===================================================== */

/* Kafelek "Chętnych" w statystykach */
.pttk-stat-info {
  background: #e0f2fe;
}

.pttk-stat-info .pttk-stat-value {
  color: #0369a1;
}

/* Badge "Brak cen" */
.pttk-no-prices-badge {
  display: inline-block;
  padding: 4px 10px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

/* Sekcja listy chętnych */
.pttk-interested-section h4 {
  margin: 0 0 16px 0;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.pttk-interested-notify-all {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 1px solid var(--pttk-primary, #379237);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.pttk-interested-notify-all p {
  margin: 0;
  font-size: 14px;
}

.pttk-interested-notify-all .pttk-meta {
  font-size: 12px;
  color: #666;
}

.pttk-interested-info-box {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
}

.pttk-interested-info-box p {
  margin: 0;
  font-size: 14px;
  color: #92400e;
}

/* Tabela chętnych */
.pttk-interested-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pttk-interested-table th {
  text-align: left;
  padding: 12px 10px;
  background: #f8f9fa;
  font-weight: 600;
  color: #444;
  border-bottom: 2px solid #eee;
  white-space: nowrap;
}

.pttk-interested-table td {
  padding: 12px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

.pttk-interested-table tr:hover td {
  background: #f8f9fa;
}

.pttk-interested-table .pttk-meta {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
}

.pttk-col-actions {
  white-space: nowrap;
}

.pttk-col-actions .pttk-btn-small {
  margin-right: 6px;
  margin-bottom: 4px;
}

/* Przycisk usuwania */
.pttk-btn-danger {
  background: #dc2626 !important;
}

.pttk-btn-danger:hover {
  background: #b91c1c !important;
}

/* Badge neutralny (brak e-mail) */
.pttk-badge-neutral {
  background: #e5e7eb;
  color: #4b5563;
}

@media (max-width: 768px) {
  .pttk-interested-notify-all {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .pttk-interested-table {
    font-size: 13px;
  }
  
  .pttk-interested-table th,
  .pttk-interested-table td {
    padding: 8px 6px;
  }
  
  .pttk-col-actions .pttk-btn-small {
    display: block;
    margin-right: 0;
    margin-bottom: 6px;
    width: 100%;
    text-align: center;
  }
}

@media (max-width: 768px) {
  .pttk-trip-stats {
    flex-wrap: wrap;
  }
  
  .pttk-stat {
    min-width: 80px;
    padding: 10px 14px;
  }
  
  .pttk-stat-value {
    font-size: 22px;
  }
  
  .pttk-leader-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
}
/* Modal */
.pttk-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}

.pttk-modal.show {
  display: flex;
}

.pttk-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.pttk-modal-content {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 500px;
  width: 90%;
  z-index: 1;
  max-height: 90vh;
  overflow-y: auto;
}

.pttk-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #eee;
}

.pttk-modal-header h3 {
  margin: 0;
  color: var(--pttk-text-heading, #0f172a);
  font-size: 18px;
}

.pttk-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pttk-modal-close:hover {
  color: #333;
}

.pttk-form {
  padding: 20px;
}

.pttk-form .pttk-form-group {
  margin-bottom: 16px;
}

.pttk-form .pttk-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #333;
  font-size: 14px;
}

.pttk-form .pttk-form-group input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.pttk-form .pttk-form-group input:focus {
  outline: none;
  border-color: var(--pttk-primary, #379237);
  box-shadow: 0 0 0 3px rgba(55, 146, 55, 0.1);
}

.pttk-form-help {
  display: block;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

.pttk-modal-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.pttk-modal-actions button {
  flex: 1;
}

.pttk-modal-close-btn {
  flex: 1;
}

/* Alert */
.pttk-alert {
  margin: 16px 0;
  padding: 16px;
  border-radius: 6px;
  font-size: 14px;
}

.pttk-alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.pttk-alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.pttk-alert-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* =============================================
 * Odwołana wycieczka — panel prowadzącego
 * ============================================= */
.pttk-trip-cancelled-panel-notice {
  border: 3px solid #c00 !important;
  background: #fff0f0;
}

.pttk-cancelled-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.pttk-cancelled-panel-header span {
  font-size: 28px;
  line-height: 1;
}

.pttk-cancelled-panel-header h3 {
  margin: 0;
  color: #c00;
  font-size: 20px;
}

.pttk-send-cancellation h4 {
  margin: 0 0 8px 0;
}

.pttk-send-cancellation textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  box-sizing: border-box;
  margin-top: 6px;
}

/* ==========================================
   Leader Trip Editor
   ========================================== */
.pttk-leader-editor {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.pttk-leader-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.pttk-leader-editor-header h2 {
  margin: 0;
}

.pttk-leader-editor-form .pttk-card {
  margin-bottom: 20px;
}

.pttk-leader-editor-form .pttk-card h3 {
  margin: 0 0 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eee;
}

.pttk-leader-editor-form .pttk-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) {
  .pttk-leader-editor-form .pttk-form-row {
    grid-template-columns: 1fr;
  }
}

.pttk-leader-editor-form .pttk-form-group {
  margin-bottom: 14px;
}

.pttk-leader-editor-form .pttk-form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 14px;
}

.pttk-leader-editor-form input[type="text"],
.pttk-leader-editor-form input[type="date"],
.pttk-leader-editor-form input[type="time"],
.pttk-leader-editor-form input[type="number"],
.pttk-leader-editor-form select,
.pttk-leader-editor-form textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.pttk-leader-editor-form textarea {
  resize: vertical;
}

/* WP Editor in front-end form */
.pttk-wp-editor-wrap .wp-editor-container {
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
}
.pttk-wp-editor-wrap .mce-toolbar-grp {
  background: #f6f7f7;
  border-bottom: 1px solid #ddd;
}
.pttk-wp-editor-wrap .wp-editor-tabs {
  display: none;
}
.pttk-wp-editor-wrap .mce-edit-area iframe {
  min-height: 200px;
}

.pttk-leader-editor-form .pttk-readonly {
  background: #f6f7f7;
  color: #666;
  cursor: not-allowed;
}

.pttk-leader-editor-form .pttk-form-help {
  display: block;
  color: #888;
  font-size: 12px;
  margin-top: 4px;
}

.pttk-leader-editor-form .pttk-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 10px;
}

.pttk-btn-large {
  padding: 12px 24px !important;
  font-size: 16px !important;
}

/* Draft status banners */
.pttk-draft-status {
  border-left: 4px solid #ddd;
}

.pttk-draft-pending {
  border-left-color: #dba617;
  background: #fef8e8;
}

.pttk-draft-imported {
  border-left-color: #00a32a;
  background: #edfaef;
}

.pttk-draft-rejected {
  border-left-color: #d63638;
  background: #fce8e8;
}

.pttk-draft-status p {
  margin: 0;
}

/* =====================================================
   Leader Editor — Enhanced Widgets
   ===================================================== */

/* Leader picker widget */
.pttk-leader-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.pttk-leaders-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pttk-leader-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  margin-bottom: 6px;
}

.pttk-leader-thumb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.pttk-leader-name {
  flex: 1;
  font-weight: 500;
}

/* Stops widget */
.pttk-stops-picker-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}

.pttk-stops-picker-row select {
  flex: 1;
}

.pttk-stops-picker-row input[type="time"] {
  width: 120px !important;
  flex: 0 0 auto;
}

.pttk-stops-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.pttk-stop-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  margin-bottom: 6px;
}

.pttk-stop-name {
  flex: 1;
  font-weight: 500;
}

.pttk-stop-time-val {
  color: #666;
  font-size: 13px;
  min-width: 50px;
}

.pttk-no-stops {
  color: #888;
  font-style: italic;
  padding: 8px 0;
}

/* Maps widget */
.pttk-maps-list {
  margin-bottom: 4px;
}

.pttk-map-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 10px 12px;
  background: #f8f9fa;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
  margin-bottom: 6px;
}

.pttk-map-fields {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pttk-map-fields input {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 13px;
  box-sizing: border-box;
}

.pttk-no-maps {
  color: #888;
  font-style: italic;
  padding: 8px 0;
}

/* Upload widgets */
.pttk-upload-widget {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.pttk-upload-preview {
  width: 120px;
  height: 90px;
  border: 2px dashed #ddd;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fafafa;
  overflow: hidden;
}

.pttk-upload-preview.has-image {
  border-style: solid;
  border-color: #ccc;
}

.pttk-upload-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pttk-upload-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.pttk-upload-spinner {
  font-size: 13px;
  color: #666;
}

.pttk-upload-file-info {
  padding: 8px 12px;
  background: #f8f9fa;
  border: 1px solid #e2e4e7;
  border-radius: 6px;
}

.pttk-upload-file-info .pttk-file-name {
  font-weight: 500;
}

.pttk-upload-file-info.has-file .pttk-file-name {
  color: var(--pttk-primary, #379237);
}

/* Gallery grid */
.pttk-gallery-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.pttk-gallery-item {
  position: relative;
  width: 100px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #ddd;
}

.pttk-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pttk-gallery-item .pttk-gallery-remove {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 22px;
  height: 22px;
  font-size: 14px;
  line-height: 22px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

.pttk-gallery-item .pttk-gallery-remove:hover {
  background: rgba(200,0,0,0.8);
}

/* Generic link-delete button */
.pttk-btn-link-delete {
  background: none;
  border: none;
  color: #d63638;
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  white-space: nowrap;
}

.pttk-btn-link-delete:hover {
  text-decoration: underline;
}

/* Small button */
.pttk-btn-sm {
  padding: 4px 12px !important;
  font-size: 13px !important;
}

/* Select2 front-end overrides */
.pttk-leader-editor-form .select2-container {
  min-width: 200px;
}

.pttk-leader-editor-form .select2-container .select2-selection--single {
  height: 38px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.pttk-leader-editor-form .select2-container .select2-selection--single .select2-selection__rendered {
  line-height: 38px;
  padding-left: 12px;
}

.pttk-leader-editor-form .select2-container .select2-selection--single .select2-selection__arrow {
  height: 38px;
}

/* =====================================================
   Draft History & Comments (front-end)
   ===================================================== */
.pttk-draft-history-card {
  margin-top: 16px;
}

.pttk-draft-history-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

.pttk-draft-history-toggle span {
  font-size: 12px;
  color: #888;
  font-weight: 400;
}

.pttk-draft-history-entry {
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #f8f9fa;
  border: 1px solid #e2e4e7;
  border-radius: 8px;
  border-left: 4px solid #8c8f94;
}

.pttk-draft-history-entry.pttk-draft-imported {
  border-left-color: #00a32a;
}

.pttk-draft-history-entry.pttk-draft-rejected {
  border-left-color: #d63638;
}

.pttk-draft-history-entry.pttk-draft-pending {
  border-left-color: #dba617;
}

.pttk-history-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.pttk-history-comment {
  margin-top: 8px;
  padding: 6px 12px;
  background: #f0f6fc;
  border-left: 3px solid #2271b1;
  font-size: 13px;
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

.pttk-history-comment.pttk-admin-comment,
blockquote.pttk-admin-comment {
  background: #fef8ee;
  border-left-color: #dba617;
  margin: 8px 0 0 0;
  padding: 6px 12px;
  font-style: italic;
  font-size: 13px;
  border-radius: 0 4px 4px 0;
}

.pttk-draft-detail-table {
  width: 100%;
  font-size: 13px;
  border-collapse: collapse;
  margin-top: 8px;
}

.pttk-draft-detail-table th {
  text-align: left;
  padding: 6px 10px;
  background: #eef0f2;
  font-weight: 600;
  color: #444;
  width: 140px;
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}

.pttk-draft-detail-table td {
  padding: 6px 10px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

/* Leader comment textarea */
.pttk-leader-editor-form textarea[name="leader_comment"] {
  width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}

.pttk-leader-editor-form textarea[name="leader_comment"]:focus {
  outline: none;
  border-color: var(--pttk-primary, #379237);
  box-shadow: 0 0 0 3px rgba(55, 146, 55, 0.1);
}

/* Outline button variant */
.pttk-btn-outline {
  background: transparent;
  border: 1px solid #8c8f94;
  color: #50575e;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 13px;
  cursor: pointer;
}

.pttk-btn-outline:hover {
  background: #f0f0f1;
  border-color: #50575e;
}

/* ==========================================
   CHAT - zakładki i czat prowadzącego
   ========================================== */
.pttk-leader-tabs {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
}

.pttk-tab-btn {
  position: relative;
}

.pttk-tab-btn.active {
  background: var(--pttk-primary, #379237);
  color: #fff;
  border-color: var(--pttk-primary, #379237);
}

.pttk-chat-leader-messages {
  min-height: 200px;
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 12px;
  background: #fafafa;
}

.pttk-chat-leader-input {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.pttk-chat-leader-input textarea {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  resize: vertical;
}

.pttk-chat-leader-input textarea:focus {
  outline: none;
  border-color: var(--pttk-primary, #379237);
}

.pttk-chat-msg {
  margin-bottom: 10px;
  max-width: 80%;
}

.pttk-chat-msg-leader {
  text-align: left;
}

.pttk-chat-msg-admin {
  text-align: right;
  margin-left: auto;
}

.pttk-chat-msg-bubble {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: left;
}

.pttk-chat-msg-leader .pttk-chat-msg-bubble {
  background: #e8f5e9;
  color: #1d2327;
}

.pttk-chat-msg-admin .pttk-chat-msg-bubble {
  background: var(--pttk-primary, #379237);
  color: #fff;
}

.pttk-chat-msg-time {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
}