.subscription-plan-header {
  background-color: var(--blue);
}

.subscription-plan-header h1,
.subscription-plan-header p {
  color: var(--off-white);
}

/* Boxed Container */
.music-plan-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 1rem;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  border: 1px solid #ddd;
}

/* Step Indicator */
.step-indicator {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

.step-indicator .step-item {
  flex: 1;
  text-align: center;
  padding: 10px;
  border: 1px solid var(--sky);
  border-radius: 4px;
  background-color: var(--sky);
  margin: 0 5px;
  font-size: 0.9rem;
  color: #fff;
}

.step-indicator .step-item.active {
  background-color: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

.step-indicator .step-item.completed {
  background-color: var(--blue);
  color: #fff;
  border-color: var(--blue);
}

/* Step Containers */
.music-plan-container h3 {
  font-size: 24px;
}

.step {
  display: none;
}

.step.active {
  display: block;
}

/* Subscription Options (Step 1) */
.simple-user-section {
  background-color: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 1rem;
  margin: 1rem 0;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 1rem;
}

.toggle-container span {
  font-weight: bold;
}

/* Toggle switch styling */
.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
  margin: 0 6px;
}

.menu-open .switch {
  z-index: -1;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked+.slider {
  background-color: var(--sky);
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.simple-user-price {
  font-size: 1.5rem;
  font-weight: bold;
  margin: 1rem 0;
  color: var(--sky);
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--form-bg);
}

thead {
  background-color: var(--dark-gray);
}

thead tr th {
  color: var(--off-white);
}

tbody tr select {
  padding: 6px 10px;
  border: 1px solid #AAAAAA;
  border-radius: 10px;
  font-size: 14px;
  /* iOS Safari fixes */
  -webkit-appearance: none;
  -moz-appearance: none;
  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='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 16px;
  padding-right: 32px;
  /* Touch-friendly sizing for mobile */
  min-height: 44px;
  /* Prevent zoom on iOS */
  font-size: 16px;
  /* Smooth transitions */
  transition: all 0.2s ease;
  /* iOS specific touch improvements */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  /* Ensure proper positioning */
  position: relative;
  z-index: 1;
}

/* iOS-specific dropdown arrow styling */
tbody tr select::-ms-expand {
  display: none;
}

/* Focus states for better accessibility */
tbody tr select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(13, 46, 103, 0.2);
  z-index: 10;
}

/* Hover states */
tbody tr select:hover {
  border-color: var(--sky);
}

/* Dropdown options styling */
tbody tr select option {
  background-color: #fff;
  color: #333;
  padding: 8px 12px;
  font-size: 14px;
  line-height: 1.4;
  border: none;
  cursor: pointer;
  /* Ensure options are visible */
  display: block;
  white-space: nowrap;
  min-height: 20px;
}

tbody tr select option:hover {
  background-color: var(--sky);
  color: #fff;
}

tbody tr select option:checked {
  background-color: var(--blue);
  color: #fff;
}

/* Ensure dropdown is properly sized */
tbody tr select {
  min-width: 120px;
}

/* Additional improvements for dropdown options visibility */
tbody tr select:focus option {
  background-color: #fff;
  color: #333;
  font-weight: normal;
}

tbody tr select option:first-child {
  font-weight: bold;
  color: var(--blue);
}

th,
td {
  border: 1px solid #ddd;
  padding: 0.75rem;
  text-align: center;
  vertical-align: middle;
}

.note {
  font-style: italic;
  text-align: center;
  margin-bottom: 1rem;
  font-size: 14px;
  padding-top: 10px;
  padding-bottom: 10px;
}

/* Order Summary & Payment Form (Step 2) */
.order-summary {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

#payment-form {
  border-top: 1px solid #ddd;
  padding-top: 20px;
}

.form-group {
  margin-bottom: 15px;
}

label {
  margin-bottom: 5px;
  margin-bottom: 3px;
  color: #2B2D33;
}

input[type="text"],
input[type="email"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #AAAAAA;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
}


/* Payment Success (Step 3) */
.success-message {
  text-align: center;
  padding: 20px;
}

.music-plan-container h3 {
  font-size: 26px;
  color: var(--dark-gray);
  line-height: 32px;
  margin-top: 20px;
  font-weight: 500;
}

.music-plan-container h5 {
  font-size: 18px;
  line-height: 22px;
  color: var(--dark-gray);
}

button.select-plan.btn {
  padding: 6px 20px;
  font-size: 16px;
  line-height: 20px;
}

.order-summary strong {
  color: var(--blue);
}

.selected-plan {

  color: var(--sky);
}

button.pay-now.btn {
  width: 50%;
  margin: 0 auto;
}

.order-summary p {
  margin-bottom: 4px;
  font-size: 16px;
}

div#step2 h3 {
  font-size: 22px;
  text-align: center;
  margin-top: 0;
}

.payment-label {
  display: block;
  width: 100%;
}

.custom-footer.site-plan-footer:after {
  display: none;
}

.note a {
  color: var(--sky);
}

.change-plan.btn {
  font-size: 14px;
  padding: 4px 10px;
  line-height: 20px;
}

/* ADDED BY ANKIT */

.radio-hidden {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

/* Style the custom radio button */
.custom-radio {
  display: inline-block;
  cursor: pointer;
  padding: 10px 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: background-color 0.3s, border-color 0.3s;
  margin-right: 10px;
}

/* Change appearance when the associated radio is checked */
.radio-hidden:checked+.custom-radio {
  background-color: #4D83BE;
  color: #fff;
  border-color: #4D83BE;
}

.payment-label {
  margin-bottom: 10px;
}

.checkout-container {
  padding: 0 !important;
}

.pay-now,
.invoice-details {
  width: 50%;
  margin: 0 auto;
}

.note {
  background: #fff3cd;
  color: #856404;
  padding: 10px;
  border-radius: 5px;
  margin-top: 10px;
}

/* ADDED BY ANKIT */
@media only screen and (min-width:768px) and (max-width:1199px) {
  .music-plan-container h3 {
    font-size: 22px;
    line-height: 26px;
  }
}

/* Responsive: Stack columns on smaller screens */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .music-plan-container h3 {
    font-size: 20px;
    line-height: 30px;
  }

  .music-plan-container h5 {
    font-size: 16px;
    line-height: 20px;
  }

  .step-indicator .step-item {
    padding: 10px 2px;
    font-size: 13px;
    line-height: 16px;
    align-items: center;
    display: flex;
    justify-content: center;
    margin: 0 3px;
  }

  section.subscribe-plan-section {
    padding: 0px 15px;
  }

  .invoice-details {
    width: 100%;
    margin: 0 auto;
  }

  /* Mobile dropdown fixes */
  tbody tr select {
    width: 100%;
    max-width: 200px;
    min-height: 48px;
    font-size: 16px !important;
    padding: 12px 40px 12px 12px;
    border-radius: 8px;
    border: 2px solid #AAAAAA;
    background-color: #fff;
    /* Mobile positioning fixes */
    position: relative;
    z-index: 5;
  }

  /* Mobile table improvements */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Ensure proper scrolling context */
    position: relative;
    z-index: 1;
  }

  table {
    min-width: 600px;
    font-size: 14px;
    /* Ensure table doesn't interfere with dropdowns */
    position: relative;
    z-index: 1;
  }

  th, td {
    padding: 0.5rem;
    min-width: 80px;
    /* Ensure cells don't block dropdowns */
    position: relative;
    z-index: 1;
  }

  /* Ensure proper spacing on mobile */
  .simple-user-section {
    margin: 1rem 0.5rem;
    padding: 1.5rem 1rem;
  }

  /* Mobile dropdown container improvements */
  .music-plan-container {
    /* Ensure proper stacking context */
    position: relative;
    z-index: 1;
  }

  /* Fix for mobile dropdown positioning */
  tbody tr {
    position: relative;
    z-index: 1;
  }

  tbody tr td {
    position: relative;
    z-index: 1;
  }
}

/* Apple device specific fixes */
@supports (-webkit-touch-callout: none) {
  /* iOS Safari specific styles */
  tbody tr select {
    -webkit-appearance: none;
    border-radius: 8px;
    background-color: #fff;
    /* iOS specific touch improvements */
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    /* iOS positioning fixes */
    position: relative;
    z-index: 15;
    /* iOS dropdown behavior */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
  }

  /* Fix for iOS Safari dropdown arrow */
  tbody tr select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-size: 20px;
    background-position: right 12px center;
    padding-right: 44px;
  }
  
  /* iOS specific option styling */
tbody tr select option {
  -webkit-appearance: none;
  background-color: #fff;
  color: #333;
  padding: 12px 16px;
  font-size: 16px;
  line-height: 1.4;
  border: none;
  border-radius: 0;
  margin: 2px 0;
  /* iOS option positioning */
  position: relative;
  z-index: 20;
}

/* Force dropdown to open below select on mobile */
@media (max-width: 768px) {
  /* Critical mobile dropdown fixes */
  html, body {
    /* Ensure body allows overflow for dropdowns */
    overflow-x: hidden;
    position: relative;
  }
  
  /* Force proper dropdown behavior */
  tbody tr select {
    /* Force dropdown positioning */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    /* Ensure proper stacking */
    z-index: 30;
    /* Force dropdown to open below */
    position: relative;
    /* iOS specific dropdown positioning */
    -webkit-transform-origin: top left;
    transform-origin: top left;
  }
  
  /* Force options to appear below */
  tbody tr select:focus {
    /* Higher z-index when focused */
    z-index: 35;
  }
  
  /* Mobile dropdown container */
  tbody tr {
    /* Ensure row doesn't interfere */
    position: relative;
    z-index: 1;
    overflow: visible;
  }
  
  /* Mobile table cell */
  tbody tr td {
    /* Ensure cell doesn't clip dropdown */
    position: relative;
    z-index: 1;
    overflow: visible;
  }
  
  /* Force table to allow overflow */
  table {
    overflow: visible;
    position: relative;
    z-index: 1;
  }
  
  /* Ensure table container allows overflow */
  .table-responsive {
    overflow: visible;
    position: relative;
    z-index: 1;
  }
  
  /* Additional mobile dropdown positioning fixes */
  .music-plan-container {
    /* Ensure container allows dropdowns to overflow */
    overflow: visible;
    position: relative;
    z-index: 1;
  }
  
  /* Force dropdown positioning context */
  tbody tr select {
    /* Create new stacking context */
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    /* Ensure dropdown appears above */
    z-index: 40;
  }
  
  /* When dropdown is open */
  tbody tr select:focus {
    z-index: 45;
  }
  
  /* Ensure options are visible */
  tbody tr select option {
    /* Force options to be visible */
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    /* Ensure proper positioning */
    position: static;
    z-index: 50;
  }
  
  /* iOS specific dropdown positioning override */
  @supports (-webkit-touch-callout: none) {
    tbody tr select {
      /* Force iOS dropdown to open below */
      -webkit-transform: translateZ(0) translateY(0);
      transform: translateZ(0) translateY(0);
      /* Ensure proper iOS positioning */
      z-index: 60;
    }
    
    /* iOS dropdown options positioning */
    tbody tr select:focus {
      /* Force dropdown to appear below on iOS */
      -webkit-transform: translateZ(0) translateY(0);
      transform: translateZ(0) translateY(0);
      z-index: 65;
    }
  }
}
  
  tbody tr select option:checked {
    background-color: var(--blue);
    color: #fff;
  }
  
  tbody tr select option:hover {
    background-color: var(--sky);
    color: #fff;
  }

  /* iOS dropdown container fixes */
  .music-plan-container {
    /* iOS specific positioning */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Ensure proper stacking */
    z-index: 1;
  }

  /* iOS table positioning */
  table {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    z-index: 1;
  }

  /* iOS cell positioning */
  tbody tr td {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    z-index: 1;
  }
}

/* Very small mobile devices */
@media (max-width: 480px) {
  .music-plan-container {
    margin: 20px auto;
    padding: 0.5rem;
  }

  tbody tr select {
    min-height: 52px;
    font-size: 16px !important;
    padding: 14px 44px 14px 14px;
    /* Small screen positioning */
    z-index: 20;
  }

  table {
    /* min-width: 500px; */
    min-width: 100%;
    font-size: 13px;
  }

  th, td {
    padding: 0.4rem;
    min-width: 70px;
  }

  .step-indicator .step-item {
    font-size: 12px;
    padding: 8px 1px;
    margin: 0 2px;
  }

  /* Small screen dropdown improvements */
  .table-responsive {
    /* Better scrolling for small screens */
    -webkit-overflow-scrolling: touch;
    overflow-x: auto;
    /* Ensure dropdowns appear above content */
    z-index: 1;
  }
}

/* Landscape orientation fixes for mobile */
@media (max-width: 768px) and (orientation: landscape) {
  tbody tr select {
    min-height: 44px;
    padding: 10px 36px 10px 10px;
    /* Landscape positioning */
    z-index: 25;
  }

  /* Landscape table improvements */
  table {
    min-width: 700px;
  }

  /* Landscape dropdown container */
  .music-plan-container {
    /* Better landscape handling */
    margin: 10px auto;
    padding: 0.5rem;
  }
}