/* Basic Reset & Font */
body {
  font-family: "Tajawal", sans-serif; /* Apply Arabic font */
  margin: 0;
  padding: 0;
  background-color: #f9f9f9; /* Lighter background */
  color: #333;
  font-size: 16px;
  line-height: 1.6;
  direction: rtl; /* Ensure RTL direction */
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Header */
header {
  /* Use 'header' tag selector */
  background-color: #fff;
  padding: 20px 40px;
  text-align: center;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#logo {
  /* Use ID selector */
  max-width: 180px; /* Adjust as needed */
  max-height: 90px; /* Adjust as needed */
  height: auto; /* Maintain aspect ratio */
  margin-bottom: 10px;
  display: block; /* Center if needed */
  margin-left: auto;
  margin-right: auto;
}

header h1 {
  margin: 5px 0;
  color: #2c3e50; /* Dark blue */
  font-weight: 700;
  font-size: 1.8rem; /* Slightly larger */
}

header p {
  color: #555;
  font-size: 1.1em;
  margin-bottom: 0;
}

/* Main Content & Form */
main {
  /* Use 'main' tag selector */
  flex-grow: 1; /* Push footer down */
  max-width: 650px; /* Slightly wider */
  width: 90%; /* Responsive width */
  margin: 40px auto;
  padding: 30px;
  background-color: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Softer shadow */
}

#plan-form {
  /* Use ID selector */
  display: grid; /* Use grid for alignment */
  gap: 20px; /* Consistent spacing */
}

/* Remove h2 styling if no longer used */
/*
#plan-form h2 {
  text-align: center;
  margin-bottom: 25px;
  color: #34495e;
}
*/

.form-group {
  margin-bottom: 0; /* Grid gap handles spacing */
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group select {
  /* Add select styling */
  width: 100%;
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1em;
  font-family: "Tajawal", sans-serif; /* Ensure font in inputs */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
  /* Add select focus */
  border-color: #007bff; /* Highlight on focus */
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Adjusted focus ring */
}

/* --- Phone Input Specific Styles --- */
.phone-group .phone-input-container {
  display: flex;
  gap: 5px; /* Space between select and input */
}

.phone-group select#countryCode {
  flex: 0 0 120px; /* Fixed width for country code dropdown, adjust as needed */
  /* Optional: Add background image for dropdown arrow if needed */
}

.phone-group input#phoneLocal {
  flex: 1 1 auto; /* Allow local number input to take remaining space */
  min-width: 0; /* Prevent overflow in flex container */
}
/* Styles for intl-tel-input if used */
/* .iti { width: 100%; } */

/* --- Radio Button Specific Styles --- */
.radio-group {
  display: flex;
  flex-direction: column; /* Stack options vertically */
  gap: 10px; /* Space between radio options */
  padding-top: 5px; /* Align with input fields */
}

.radio-group label {
  display: flex; /* Align radio button and text */
  align-items: center;
  cursor: pointer;
  font-weight: normal; /* Normal weight for radio labels */
  margin-bottom: 0; /* Remove default label margin */
}

.radio-group input[type="radio"] {
  margin-left: 8px; /* Space between radio and text (RTL) */
  margin-right: 0; /* Reset margin-right for RTL */
  width: auto; /* Override default input width */
  accent-color: #007bff; /* Color the radio button itself */
}

/* --- Submit Button --- */
#submit-btn {
  /* Use ID selector */
  display: block;
  width: 100%;
  padding: 15px;
  background-color: #28a745; /* Green */
  color: white;
  font-size: 1.1em;
  font-weight: 700;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-family: "Tajawal", sans-serif; /* Ensure font */
  margin-top: 10px; /* Add some top margin */
}

#submit-btn:hover:not(:disabled) {
  background-color: #218838; /* Darker green */
}
#submit-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.7; /* Indicate disabled state */
}

/* Status Message Area */
#status-area {
  /* Use ID selector */
  margin-top: 20px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-weight: bold;
  display: none; /* Hidden by default */
  border: 1px solid transparent; /* Reserve space for border */
}

#status-area.success {
  background-color: #d4edda; /* Light green */
  color: #155724; /* Dark green */
  border-color: #c3e6cb;
  display: block;
}

#status-area.error {
  background-color: #f8d7da; /* Light red */
  color: #721c24; /* Dark red */
  border-color: #f5c6cb;
  display: block;
}

#status-area.loading {
  background-color: #e2e3e5; /* Light grey */
  color: #383d41; /* Dark grey */
  border-color: #d6d8db;
  display: block;
}

/* Footer */
footer {
  /* Use 'footer' tag selector */
  text-align: center;
  margin-top: auto; /* Pushes footer to bottom */
  padding: 20px;
  font-size: 0.9em;
  color: #777;
  border-top: 1px solid #eee;
  background-color: #fff; /* Match header/main background */
}

/* Responsive Adjustments (Optional Example) */
@media (max-width: 600px) {
  header {
    padding: 15px 20px;
  }
  header h1 {
    font-size: 1.5rem;
  }
  main {
    margin: 20px auto;
    padding: 20px;
  }
  .phone-group select#countryCode {
    flex-basis: 100px; /* Slightly smaller dropdown on mobile */
  }
}
