/* ===== BASE STYLES ===== */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f4;
  margin: 0;
  padding: 20px;
}

/* ===== HEADER SECTION ===== */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2rem;
  color: #333;
  margin-bottom: 10px;
}

.user-info {
  background: #e3f2fd;
  padding: 10px 20px;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 15px;
}

/* ===== NAVIGATION ===== */
.nav-links {
  margin-bottom: 20px;
}

.nav-links a {
  display: inline-block;
  margin: 0 10px;
  padding: 8px 16px;
  background-color: #28a745;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-size: 0.9rem;
}

.nav-links a:hover {
  background-color: #1e7e34;
}

.nav-links .sign-out-btn {
  background-color: #dc3545;
}

.nav-links .sign-out-btn:hover {
  background-color: #c82333;
}

/* ===== FORM CONTAINER ===== */
.form-container {
  max-width: 800px;
  margin: 0 auto;
}

form {
  background: #ffffff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  text-align: left;
}

/* ===== FORM ELEMENTS ===== */
label {
  display: block;
  margin-top: 20px;
  font-weight: bold;
  font-size: 1rem;
  color: #333;
}

label:first-of-type {
  margin-top: 0;
}

input[type="text"],
input[type="url"],
input[type="email"],
textarea,
select {
  width: 100%;
  padding: 12px 15px;
  margin-top: 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

input[type="text"]:focus,
input[type="url"]:focus,
input[type="email"]:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: #007bff;
}

textarea {
  resize: vertical;
  min-height: 100px;
  font-family: Arial, sans-serif;
}

select:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
}

.required {
  color: #dc3545;
}

/* ===== FIELD GROUPS & TOOLTIPS ===== */
.field-group {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px; 
}

.info-icon {
  width: 18px;
  height: 18px;
  background-color: #007bff;
  color: white;
  border-radius: 50%;
  font-size: 12px;      
  cursor: pointer;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tooltip {
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #4a4a4a;
  color: white;
  padding: 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  width: 500px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  margin-bottom: 5px;
}

.tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #333;
}

.info-icon:hover .tooltip {
  opacity: 1;
  visibility: visible;
}

/* ===== MAP SECTION ===== */
.map-container {
  margin-top: 20px;
  width: 100%;
  height: 400px;
  border: 2px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

.coordinate-display {
  margin-top: 15px;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #495057;
}

/* ===== SUBMIT SECTION ===== */
.submit-section {
  margin-top: 30px;
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.submit-btn {
  padding: 15px 40px;
  font-size: 1.1rem;
  background-color: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s;
  min-width: 200px;
}

.submit-btn:hover {
  background-color: #0056b3;
}

.submit-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

/* ===== UPGRADE SECTION ===== */
.upgrade-section {
  margin-top: 30px;
  padding: 20px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  text-align: center;
}

.upgrade-section h3 {
  margin-top: 0;
  color: #856404;
}

.upgrade-section button {
  padding: 12px 25px;
  background-color: #ffc107;
  color: #212529;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
}

.upgrade-section button:hover {
  background-color: #e0a800;
}

/* ===== LOADING OVERLAY ===== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 30px;
  border-radius: 8px;
  text-align: center;
}

/* ===== DEBUG INFO ===== */
.debug-info {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 4px;
  padding: 10px;
  margin: 10px 0;
  font-size: 0.9rem;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
  body {
    padding: 7px;
  }
  
  form {
    padding: 8px;
  }
  
  .header h1 {
    font-size: 1.5rem;
  }
  
  .map-container {
    height: 300px;
  }
  
  .nav-links a {
    display: block;
    margin: 5px 0;
    text-align: center;
  }
  
  

.terms-section {
  margin: 20px 0;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #ddd;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.checkbox-container input[type="checkbox"] {
  margin-top: 4px;
  cursor: pointer;
}

.checkbox-container span {
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-container a {
  color: #007bff;
  text-decoration: none;
}

.checkbox-container a:hover {
  text-decoration: underline;
}

/* Search box styles */
.search-container {
  position: relative;
  margin-bottom: 10px;
}

.search-box {
  width: 100%;
  padding: 12px 40px 12px 12px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.3s ease;
}

.search-box:focus {
  border-color: #007bff;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.3);
}

.search-btn {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: #007bff;
  color: white;
  border: none;
  padding: 6px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

.search-btn:hover {
  background: #0056b3;
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-top: none;
  border-radius: 0 0 6px 6px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-suggestion {
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

.search-suggestion:hover {
  background: #f8f9fa;
}

.search-suggestion:last-child {
  border-bottom: none;
}

.search-loading {
  padding: 10px 12px;
  color: #666;
  font-style: italic;
}

.search-no-results {
  padding: 10px 12px;
  color: #999;
  font-style: italic;
}

.location-info {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 5px;
}
}

/* ===== STREAM METHOD SELECTION ===== */
.stream-method-section {
  margin-bottom: 40px;
}

.method-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 1100px;
  margin: 0 auto 30px;
}

.method-card {
  border: 2px solid #e9ecef;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.method-card:hover {
  border-color: #667eea;
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.15);
}

.method-card.active {
  border-color: #667eea;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8f0ff 100%);
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.25);
  position: relative;
}

.method-card.active::before {
  content: "✓";
  position: absolute;
  top: 12px;
  right: 12px;
  background: #28a745;
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.method-card h3 {
  color: #333;
  margin: 12px 0 8px 0;
  font-size: 1.15rem;
  font-weight: 600;
}

.method-card p {
  color: #666;
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.method-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 8px;
}

.stream-url-card .method-icon { color: #17a2b8; }
.go-live-card .method-icon { color: #dc3545; }

/* Form Sections */
.hidden {
  display: none !important;
}

/* Mobile Responsiveness for Method Cards */
@media (max-width: 768px) {
  .method-cards {
    grid-template-columns: 1fr;
    max-width: 100%;
  }
  
  .method-card {
    padding: 18px;
  }
  
  .method-icon {
    font-size: 2rem;
  }
  
  .method-card h3 {
    font-size: 1.05rem;
  }
  
  .method-card p {
    font-size: 0.85rem;
  }
   
}

/* Tablet - 2 columns */
@media (min-width: 769px) and (max-width: 1024px) {
  .method-cards {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
  }
}

/* Tablet responsive adjustments */
@media (max-width: 992px) and (min-width: 769px) {
  .usage-type-selector > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  
  /* Make the third item span both columns on tablet */
  .usage-option:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 50%;
    margin: 0 auto;
  }
}

.usage-type-selector {
  margin: 20px 0;
  padding: 20px;
  background: #f8f9fa;
  border: 2px solid #e9ecef;
  border-radius: 8px;
}

.usage-type-selector h3 {
  margin-top: 0;
  color: #495057;
}

/* Default grid for desktop */
.usage-type-selector > div[style*="grid-template-columns"] {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 15px;
  margin-top: 15px;
}

/* Usage option styling */
.usage-option {
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 0px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.usage-option:hover {
  border-color: #007bff;
  background-color: #f8f9fa;
}

.usage-option input[type="radio"] {
  margin-bottom: 10px;
}

.usage-option label {
  cursor: pointer;
  display: block;
  font-size: 14px;
  line-height: 1.3;
}

.usage-option label div {
  font-size: 1.5em;
  margin-bottom: 8px;
}

.usage-option label strong {
  display: block;
  margin-bottom: 4px;
}

.usage-option label small {
  color: #666;
  font-size: 12px;
}

/* Mobile responsive adjustments for usage selector */
@media (max-width: 768px) {
  .usage-type-selector > div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }
  
  .usage-option {
    padding: 12px;
    min-height: 100px;
  }
  
  .usage-option label div {
    font-size: 1.3em;
    margin-bottom: 6px;
  }
  
  .usage-option label {
    font-size: 13px;
  }
  
  .usage-option label small {
    font-size: 11px;
  }
}

.professional-option {
    margin-top: 8px;
    font-size: 14px;
    display: flex;
    justify-content: center;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    font-size: 13px;
}

.professional-checkbox {
    margin-right: 8px;
    transform: scale(1.1);
}