/* Import Google Fonts for a premium feel */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Form container - Glass/Card effect */
.fwr-form {
  max-width: 900px;
  margin: 3em auto;
  padding: 3.5em;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 5px 15px rgba(0, 0, 0, 0.04);
  font-family: 'Inter', "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow: visible;
  position: relative;
  z-index: 1;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

/* Row layout using Flexbox */
.fwr-form .fwr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 2em;
  margin-bottom: 2em;
}

.fwr-form .fwr-row>div {
  flex: 1 1 300px;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* Labels: Clean & Professional */
.fwr-form label {
  margin-bottom: 0.6em;
  font-weight: 600;
  color: #2d3748;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Inputs and Selects - High-End Tactile Feel */
.fwr-form input,
.fwr-form select {
  width: 100%;
  padding: 0.9em 1.2em;
  /* Default comfortable padding */
  font-size: 1rem;
  color: #1a202c;
  border: 1px solid #cbd5e0;
  border-radius: 10px;
  background-color: #f8fafc;
  line-height: 1.5;
  transition: all 0.2s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: inset 0 2px 4px 0 rgba(0, 0, 0, 0.02);
  min-height: 48px;
  /* Ensure sufficient touch target everywhere */
}

.fwr-form input:focus,
.fwr-form select:focus {
  border-color: #3182ce;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.02);
  transform: translateY(-1px);
}

.fwr-form input:hover,
.fwr-form select:hover {
  border-color: #a0aec0;
  background-color: #ffffff;
}

/* PWD Highlight Field - Refined to be Professional but Visible */
.fwr-form input#pwd_number {
  border: 2px solid #ed8936;
  /* Distinct Orange Border */
  background-color: #fffaf0;
  /* Very light orange/yellow tint */
}

.fwr-form input#pwd_number:focus {
  border-color: #dd6b20;
  box-shadow: 0 0 0 4px rgba(237, 137, 54, 0.2);
}

.fwr-form label[for="pwd_number"] {
  background-color: #fefcbf;
  color: #744210;
  padding: 0.3em 0.8em;
  border-radius: 6px;
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Submit button - Sleek Gradient */
.fwr-form button {
  width: 100%;
  padding: 1.1em;
  background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
  /* Elegant Dark Theme Button */
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  text-transform: uppercase;
  margin-top: 1.5em;
}

.fwr-form button:hover {
  background: linear-gradient(135deg, #2d3748 0%, #4a5568 100%);
  transform: translateY(-2px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Checkboxes - Custom and Clean */
.fwr-form .form-check {
  display: flex;
  align-items: flex-start;
  margin-bottom: 1em;
  padding-left: 0;
}

.fwr-form .form-check-input {
  width: 1.3em;
  height: 1.3em;
  margin-top: 0.2em;
  margin-right: 0.8em;
  cursor: pointer;
  border-radius: 4px;
  border: 1px solid #cbd5e0;
}

.fwr-form .form-check-label {
  font-size: 0.95rem;
  color: #4a5568;
  line-height: 1.6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .fwr-form {
    padding: 1.25em 1em;
    /* Balanced padding */
    margin: 0.5em 0;
    /* Minimized vertical margin */
    border-radius: 12px;
    width: 100%;
    box-sizing: border-box;
  }

  .fwr-form .fwr-row {
    flex-direction: column;
    gap: 0.75em;
    /* Reduced gap significantly from 1.25em */
    margin-bottom: 0.75em;
    /* Reduced margin */
    width: 100%;
  }

  .fwr-form .fwr-row>div {
    width: 100%;
    flex: 1 1 auto;
  }

  /* Fix for "Clipping" on Mobile Selects/Inputs */
  .fwr-form input:not([type="checkbox"]):not([type="radio"]),
  .fwr-form select {
    padding: 12px 10px;
    font-size: 16px;
    line-height: 1.4;
    height: auto !important;
    min-height: 48px;

    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
  }

  .fwr-form label {
    margin-bottom: 0.3em;
    /* Tighter label spacing */
  }

  /* Fix for "hanging" checkboxes - ENFORCED */
  .fwr-form .form-check {
    display: flex !important;
    /* Force flex */
    align-items: flex-start !important;
    padding-left: 0 !important;
    gap: 12px;
    margin-bottom: 0.5em;
  }

  .fwr-form .form-check-input {
    margin-top: 3px !important;
    margin-right: 0 !important;
    flex-shrink: 0;
    width: 20px !important;
    height: 20px !important;
    min-height: auto !important;
    /* Override the 48px if it leaked */
    padding: 0 !important;
    /* Remove generic padding */
  }

  .fwr-form .form-check-input {
    margin-top: 3px !important;
    margin-right: 0 !important;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
  }

  .fwr-form .form-check-label {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  .fwr-form button {
    padding: 14px;
    font-size: 1rem;
    margin-top: 1em;
  }
}

/* Custom Checkbox Styling V25 - Final Polish */
.fwr-form .form-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 1em;
  padding-left: 30px !important;
  /* Aggressive indentation as requested */
}

.fwr-form .form-check-input {
  width: 16px !important;
  height: 16px !important;
  min-height: 16px !important;
  margin-top: 6px !important;
  /* Aggressive push down (was 5px) to fix 'hanging' */
  /* Precise optical alignment for 16px box against line-height 1.5 */
  flex-shrink: 0;
  border-radius: 50% !important;
  /* Oval/Circle as requested */
  /* Slightly tighter radius for smaller box */
  border: 2px solid #a0aec0 !important;
  background-color: #fff;
  cursor: pointer;
  float: none;
}


/* --- Payment Button (Standard & Elementor Compatible) --- */
.fwr-pay-btn {
  display: inline-block;
  padding: 14px 28px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  /* Modern Purple/Blue Gradient */
  color: #ffffff !important;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none !important;
  border-radius: 50px;
  /* Pill shape */
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  line-height: 1.2;
  margin: 10px 0;
  font-family: 'Inter', sans-serif;
  min-width: 200px;
  /* Minimum width for presence */
}

/* Hover Effect */
.fwr-pay-btn:hover {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: 0 7px 14px rgba(50, 50, 93, 0.1), 0 3px 6px rgba(0, 0, 0, 0.08);
  color: #ffffff !important;
}

/* Active/Click Effect */
.fwr-pay-btn:active {
  transform: translateY(1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Loading State (Disabled) */
.fwr-pay-btn:disabled,
.fwr-pay-btn.disabled {
  background: #cbd5e0;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Responsive Mobile */
@media (max-width: 768px) {
  .fwr-pay-btn {
    width: 100%;
    /* Full width on mobile */
    padding: 16px 20px;
    font-size: 18px;
  }
}

/* ==========================================================================
   Table Styles (Admin & Frontend)
   ========================================================================== */
.fwr-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 15px;
  background: #ffffff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.fwr-table th {
  background-color: #f8fafc;
  color: #4a5568;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.05em;
  padding: 14px 16px;
  border-bottom: 2px solid #edf2f7;
  text-align: left;
}

.fwr-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf2f7;
  color: #2d3748;
  font-size: 13px;
  vertical-align: middle;
  line-height: 1.5;
}

.fwr-table tr:hover td {
  background-color: #f1f5f9;
}

.fwr-table tr:last-child td {
  border-bottom: none;
}

.fwr-actions-col {
  text-align: center !important;
  width: 80px;
}

.fwr-badge-pwd {
  display: inline-block;
  background-color: #fefcbf;
  color: #744210;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 4px;
  font-weight: 600;
  border: 1px solid #f6e05e;
}

/* Improved Delete Button in Table */
.fwr-delete-single {
  display: inline-block;
  text-decoration: none;
  color: #e53e3e !important;
  border: 1px solid #fc8181 !important;
  background-color: #fff5f5;
  padding: 4px 10px !important;
  border-radius: 6px !important;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
}

.fwr-delete-single:hover {
  background-color: #e53e3e;
  color: #fff !important;
  border-color: #e53e3e !important;
}

/* ==========================================================================
   Admin Container & Toolbar Styles (Premium UI)
   ========================================================================== */
.fwr-wrap {
  margin: 20px 20px 0 2px;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.fwr-title {
  font-size: 24px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 25px;
  padding-bottom: 12px;
  border-bottom: 2px solid #e2e8f0;
  letter-spacing: -0.01em;
}

.fwr-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  border: 1px solid #e2e8f0;
}

.fwr-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  background: #f8fafc;
  padding: 16px 20px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  margin-bottom: 24px;
}

.fwr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  border: 1px solid transparent;
  line-height: 1.5;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.fwr-btn:active {
  transform: translateY(1px);
}

.fwr-btn-outline {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569 !important;
}

.fwr-btn-outline:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

.fwr-btn-primary {
  background-color: #3b82f6;
  color: #ffffff !important;
  border-color: #3b82f6;
}

.fwr-btn-primary:hover {
  background-color: #2563eb;
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3), 0 2px 4px -1px rgba(59, 130, 246, 0.2);
}

.fwr-btn-success {
  background-color: #10b981;
  color: #ffffff !important;
  border-color: #10b981;
}

.fwr-btn-success:hover {
  background-color: #059669;
  color: #ffffff !important;
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.3), 0 2px 4px -1px rgba(16, 185, 129, 0.2);
}