/* ===== VOTER STEP ===== */

.voter-step-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}

.voter-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
}

.voter-step-section label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.voter-step-section input,
.voter-step-section textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.voter-step-section textarea {
  resize: vertical;
}


/* ================= VOTER SIDEBAR ================= */

.voter-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(2px);
  z-index: 999;
  display: none;
}

/* ===== PANEL ===== */
.voter-panel {
  position: fixed;
  top: 0;
  right: -100%;
  height: 100vh;
  width: 420px;
  max-width: 100%;
  background: #ffffff;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  transition: right .35s ease;
}

.voter-panel.open { right: 0; }

/* ===== HEADER ===== */
.voter-header {
  padding: 20px;
  border-bottom: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.voter-header h2 {
  font-size: 18px;
  margin: 0;
}

.voter-header p {
  font-size: 13px;
  color: #6b7280;
}

.voter-close {
  font-size: 26px;
  border: none;
  background: none;
  cursor: pointer;
}

/* ===== BODY ===== */
.voter-body {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
}

/* ===== STEPS ===== */
.voter-step {
  display: none;
  padding-bottom: 90px;
}

.voter-step.active {
  display: block;
}

.voter-step h3 {
  font-size: 17px;
  margin-bottom: 12px;
}

/* ===== SERVICE SELECTION ===== */
.voter-service-options {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.voter-service-card {
  border: 1px solid #e5e7eb;
  padding: 16px;
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  font-weight: 600;
  background: #f9fafb;
}

.voter-service-card input {
  display: none;
}

.voter-service-card:has(input:checked) {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

/* ===== STEP FORM ===== */
.voter-step-section {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 18px;
}

.voter-section-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
}

.voter-step-section label {
  display: block;
  margin-top: 14px;
  margin-bottom: 6px;
  font-weight: 600;
}

.voter-step-section input,
.voter-step-section textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  font-size: 14px;
}

.voter-step-section textarea {
  resize: vertical;
}

/* ================= DOCUMENT UPLOAD (FINAL POLISHED) ================= */

/* Card */
.pan-upload-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 14px;
}

/* Title */
.pan-upload-card strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111827;
}

/* Subtitle */
.pan-upload-card span {
  display: block;
  font-size: 12px;
  color: #6b7280;
  margin: 6px 0 10px;
}

/* ===== Inline dropdown + upload ===== */
.doc-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Modern select */
.modern-select {
  position: relative;
  flex: 1;
}

.modern-select select {
  width: 100%;
  appearance: none;
  padding: 10px 38px 10px 12px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

.modern-select::after {
  content: "▾";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}

.modern-select select:focus {
  outline: none;
  border-color: #2563eb;
  background: #ffffff;
}

/* Upload button */
.upload-btn {
  background: #2563eb;
  color: #ffffff;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.upload-btn.disabled {
  background: #cbd5f5;
  cursor: not-allowed;
}

/* Filename */
.file-name {
  font-size: 12px;
  color: #2563eb;
  margin-top: 6px;
  display: block;
}

/* ===== BILL ===== */
.voter-bill-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 18px;
}

.bill-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.bill-row.total {
  font-size: 18px;
  font-weight: 700;
}

.voter-bill-card hr {
  border: none;
  border-top: 1px dashed #d1d5db;
  margin: 14px 0;
}

/* ===== FOOTER ===== */
.voter-footer {
  position: sticky;
  bottom: 0;
  background: #ffffff;
  padding: 14px;
  border-top: 1px solid #e5e7eb;
  display: flex;
  justify-content: space-between;
}

.voter-footer button {
  padding: 10px 22px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  cursor: pointer;
}

.voter-next {
  background: #2563eb;
  color: #ffffff;
}

.voter-back {
  background: #f1f5f9;
}

.voter-next.disabled,
.voter-next:disabled {
  background: #cbd5f5;
  cursor: not-allowed;
  opacity: 0.6;
}

/* ===== ERROR ===== */
.error {
  color: #dc2626;
  font-size: 12px;
  margin-top: 4px;
}

/* ===== MOBILE ===== */
@media (max-width: 640px) {
  .voter-panel { width: 100%; }

  .doc-row {
    flex-direction: column;
    align-items: stretch;
  }
}

/* =========================================
   UNIVERSAL MOBILE PANEL SYSTEM
========================================= */

@media (max-width: 640px){

  .logo-panel,
  .flex-panel,
  .gst-panel,
  .web-panel,
  .ts-panel,
  .company-panel,
  .lam-panel,
  .mc-panel,
  .pan-panel,
  .print-panel,
  .vc-panel,
  .voter-panel {
    width: 100% !important;
    max-width: 100% !important;
    right: -100% !important;
    border-radius: 0 !important;
  }

  .logo-panel.open,
  .flex-panel.open,
  .gst-panel.open,
  .web-panel.open,
  .ts-panel.open,
  .company-panel.open,
  .lam-panel.open,
  .mc-panel.open,
  .pan-panel.open,
  .print-panel.open,
  .vc-panel.open,
  .voter-panel.open {
    right: 0 !important;
  }
}

/* ================= ULTRA MODERN SELECT (FINAL OVERRIDE) ================= */

/* Reset native select completely */
.pan-upload-card select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;

  width: 100%;
  height: 44px;

  padding: 10px 42px 10px 14px;

  border-radius: 10px;
  border: 1px solid #d1d5db;

  background-color: #ffffff;
  background-image: none;

  font-size: 14px;
  font-weight: 500;
  color: #111827;

  cursor: pointer;
}

/* Wrapper for arrow positioning */
.pan-upload-card {
  position: relative;
}

/* Custom dropdown arrow */
.pan-upload-card::after {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  pointer-events: none;

  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Focus state (professional blue) */
.pan-upload-card select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Hover */
.pan-upload-card select:hover {
  border-color: #9ca3af;
}

/* Disabled look */
.pan-upload-card select:disabled {
  background-color: #f3f4f6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Placeholder option */
.pan-upload-card select option[value=""] {
  color: #9ca3af;
}

/* ================= SELECT-ONLY ARROW FIX ================= */

/* Wrap select properly */
.pan-upload-card {
  position: relative;
}

/* Apply arrow ONLY when select exists */
.pan-upload-card select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  height: 44px;

  padding: 10px 42px 10px 14px;

  border-radius: 10px;
  border: 1px solid #d1d5db;

  background-color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  color: #111827;
}

/* Arrow ONLY for select */
.pan-upload-card select + .select-arrow {
  display: none;
}

/* Inject arrow using :has(select) */
.pan-upload-card:has(select)::after {
  content: "";
  position: absolute;
  right: 35px;
  top: 35%; /* 👈 aligns with select height */

  width: 10px;
  height: 10px;

  pointer-events: none;

  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236b7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}

/* Focus */
.pan-upload-card select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* Hover */
.pan-upload-card select:hover {
  border-color: #9ca3af;
}
