/* ============================================================================
 * PaxPost24 Portal Unification CSS v1.0
 * ============================================================================
 * Vereinheitlicht Tab-Klassen (.pg-tab, .tp-tab, .dc-tab, .pc-tab) → uniform look
 * + Form-Inputs einheitliches Styling
 * ============================================================================ */

/* === UNIFIED PORTAL TABS === */
.pg-tabs, .tp-tabs, .dc-tabs, .pc-tabs, .pp-portal-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  padding: 8px;
  background: rgba(15, 20, 25, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  margin-bottom: 18px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(45, 212, 191, 0.3) transparent;
}

.pg-tabs::-webkit-scrollbar,
.tp-tabs::-webkit-scrollbar,
.dc-tabs::-webkit-scrollbar,
.pc-tabs::-webkit-scrollbar,
.pp-portal-tabs::-webkit-scrollbar {
  height: 4px;
}
.pg-tabs::-webkit-scrollbar-thumb,
.tp-tabs::-webkit-scrollbar-thumb,
.dc-tabs::-webkit-scrollbar-thumb,
.pc-tabs::-webkit-scrollbar-thumb,
.pp-portal-tabs::-webkit-scrollbar-thumb {
  background: rgba(45, 212, 191, 0.3);
  border-radius: 4px;
}

.pg-tab, .tp-tab, .dc-tab, .pc-tab, .pp-portal-tab {
  display: inline-flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 16px !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 100px !important;
  color: rgba(240, 244, 248, 0.6) !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  letter-spacing: 0.05em !important;
  cursor: pointer !important;
  transition: all 0.25s !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}

.pg-tab:hover, .tp-tab:hover, .dc-tab:hover, .pc-tab:hover, .pp-portal-tab:hover {
  background: rgba(45, 212, 191, 0.06) !important;
  color: #2DD4BF !important;
  border-color: rgba(45, 212, 191, 0.2) !important;
}

.pg-tab.active, .tp-tab.active, .dc-tab.active, .pc-tab.active, .pp-portal-tab.active {
  background: linear-gradient(135deg, #2DD4BF, #14B8A6) !important;
  color: #0F1419 !important;
  border-color: #2DD4BF !important;
  font-weight: 700 !important;
  box-shadow: 0 4px 14px rgba(45, 212, 191, 0.3) !important;
}

.pg-tab .ic, .tp-tab .ic, .dc-tab .ic, .pc-tab .ic, .pp-portal-tab .ic {
  font-size: 14px;
  display: inline-flex;
  align-items: center;
}

/* === UNIFIED FORM INPUTS === */
.input,
input.input,
select.input,
textarea.input {
  width: 100%;
  padding: 12px 16px !important;
  background: rgba(15, 20, 25, 0.5) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  color: #F0F4F8 !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 14px !important;
  outline: none !important;
  transition: 0.25s !important;
  box-sizing: border-box;
}

.input:focus,
input.input:focus,
select.input:focus,
textarea.input:focus {
  border-color: #2DD4BF !important;
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12) !important;
  background: rgba(15, 20, 25, 0.7) !important;
}

.input:disabled,
input.input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

textarea.input {
  min-height: 80px;
  resize: vertical;
  font-family: 'Inter', sans-serif !important;
}

select.input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232DD4BF'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px !important;
}

.input-label {
  display: block;
  font-family: 'IBM Plex Mono', monospace !important;
  font-size: 10px !important;
  letter-spacing: 0.18em !important;
  color: rgba(240, 244, 248, 0.55) !important;
  text-transform: uppercase !important;
  font-weight: 600 !important;
  margin-bottom: 6px !important;
}

.input-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.input-row > div {
  min-width: 0; /* prevent overflow */
}

@media (max-width: 540px) {
  .input-row {
    grid-template-columns: 1fr;
  }
}

/* === REQUIRED FIELD INDICATOR === */
.input-label::after,
[data-required="true"] + .input-label::after {
  content: '';
}

label[for] .req,
.req-marker {
  color: #FB923C;
  margin-left: 3px;
  font-weight: 700;
}

/* === BUTTON UNIFICATION === */
.btn,
button.btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 13px 26px !important;
  border-radius: 100px !important;
  font-family: 'Inter', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  border: 1px solid !important;
  transition: all 0.25s !important;
  text-decoration: none !important;
  white-space: nowrap;
}

.btn.primary,
button.btn.primary {
  background: linear-gradient(135deg, #2DD4BF, #14B8A6) !important;
  color: #0F1419 !important;
  border-color: #2DD4BF !important;
  box-shadow: 0 6px 20px rgba(45, 212, 191, 0.25) !important;
}

.btn.primary:hover,
button.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(45, 212, 191, 0.4) !important;
}

.btn.secondary,
button.btn.secondary {
  background: transparent !important;
  color: #F0F4F8 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

.btn.secondary:hover {
  border-color: #2DD4BF !important;
  color: #2DD4BF !important;
}

.btn.danger,
button.btn.danger {
  background: transparent !important;
  color: #FCA5A5 !important;
  border-color: rgba(239, 68, 68, 0.4) !important;
}

.btn.full,
button.btn.full {
  width: 100%;
}

.btn:disabled,
button.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* === VALIDATION HINT === */
.pp-validate-hint {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin-top: 6px;
  transition: 0.2s;
  min-height: 14px;
}

/* === LOADING SPINNER === */
.pp-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(15, 20, 25, 0.3);
  border-top-color: #0F1419;
  border-radius: 50%;
  animation: ppSpin 0.7s linear infinite;
}

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

/* === EMPTY STATE === */
.pp-empty-state {
  text-align: center;
  padding: 60px 20px;
}

/* === FORM SECTION HEADER === */
.form-section-h {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  margin: 18px 0 10px;
  color: #F0F4F8;
}

.form-section-h i {
  color: #2DD4BF;
  font-style: italic;
}

/* === DRAFT INDICATOR === */
.pp-draft-indicator {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  padding: 8px 16px;
  background: rgba(45, 212, 191, 0.15);
  border: 1px solid rgba(45, 212, 191, 0.4);
  color: #2DD4BF;
  border-radius: 100px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  font-weight: 600;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

/* === RESULT COUNT === */
.pp-result-count {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* === SKELETON LOADING === */
.pp-skeleton-card {
  background: rgba(36, 52, 71, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 10px;
  animation: ppShimmer 1.5s ease-in-out infinite;
}

@keyframes ppShimmer {
  50% { opacity: 0.5; }
}

/* === RTL SUPPORT === */
body.pp-rtl .pg-tabs,
body.pp-rtl .tp-tabs,
body.pp-rtl .dc-tabs,
body.pp-rtl .pc-tabs,
body.pp-rtl .pp-portal-tabs {
  flex-direction: row-reverse;
}

body.pp-rtl select.input {
  background-position: left 12px center;
  padding-right: 16px !important;
  padding-left: 40px !important;
}
