@import 'weather-alert-tooltip.css';

/**
 * Component-specific styles
 * Extracted from various CSS files to improve organization
 */

/* Button Components */
.btn {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
  transition: all var(--transition-speed) ease;
}

.btn-primary {
  color: var(--text-light);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--text-light);
  background-color: transparent;
  border-color: var(--text-light);
}

.btn-secondary:hover {
  background-color: var(--text-light);
  color: var(--text-dark);
}

.btn-danger {
  color: var(--text-light);
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

.btn-danger:hover {
  background-color: var(--danger-hover);
  border-color: var(--danger-hover);
}

/* Form Components */
.form-group {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}

.form-group label {
  width: 100px;
  margin-right: 10px;
}

.form-control {
  display: block;
  width: 100%;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-light);
  background-color: var(--dark-panel);
  background-clip: padding-box;
  border: 1px solid var(--dark-border);
  border-radius: var(--border-radius);
  transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

.form-control:focus {
  color: var(--text-light);
  background-color: var(--dark-panel);
  border-color: var(--primary-color);
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-control::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

/* Modal Components */
.modal-content {
  background-color: var(--dark-panel);
  border: 1px solid var(--dark-border);
  border-radius: var(--border-radius-large);
  box-shadow: var(--shadow-large);
  color: var(--text-light);
}

.modal-header {
  border-bottom: 1px solid var(--dark-border);
  padding: 1rem;
}

.modal-title {
  margin-bottom: 0;
  line-height: 1.5;
  color: var(--text-light);
  font-weight: 600;
}

.modal-body {
  padding: 1rem;
}

.modal-footer {
  border-top: 1px solid var(--dark-border);
  padding: 1rem;
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

/* Alert Components */
.alert {
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  border: 1px solid transparent;
  border-radius: var(--border-radius);
}

.alert-info {
  color: var(--text-light);
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.alert-success {
  color: var(--text-light);
  background-color: var(--selected-color);
  border-color: var(--selected-color);
}

.alert-danger {
  color: var(--text-light);
  background-color: var(--danger-color);
  border-color: var(--danger-color);
}

/* Badge Components */
.badge {
  display: inline-block;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: baseline;
  border-radius: var(--badge-radius);
}

.badge-primary {
  color: var(--text-light);
  background-color: var(--primary-color);
}

.badge-success {
  color: var(--text-light);
  background-color: var(--selected-color);
}

.badge-danger {
  color: var(--text-light);
  background-color: var(--danger-color);
}

/* Loading Components */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--text-light);
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Coming Soon Component */
.coming-soon {
  position: relative;
  text-decoration: line-through;
  text-decoration-color: var(--text-muted);
  text-decoration-thickness: 2px;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
  transition: all var(--transition-base);
}

.coming-soon:hover {
  opacity: 0.8;
}

/* Coming Soon Tooltip (created by JavaScript) */
#coming-soon-tooltip {
  position: fixed;
  background-color: var(--primary-color);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 13.6px;
  font-weight: 500;
  line-height: 20.4px;
  text-align: left;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-base), visibility var(--transition-base);
  z-index: 99999;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translate(-50%, -100%);
}

/* Light theme overrides for coming-soon */
body.light-theme .coming-soon {
  text-decoration-color: var(--text-muted-dark);
  color: var(--text-muted-dark);
}

body.light-theme .coming-soon::before {
  background-color: var(--primary-color);
  color: var(--text-light);
}

body.light-theme .coming-soon::after {
  border-top-color: var(--primary-color);
}

/* Mobile adjustments for coming-soon tooltip */
@media (max-width: 768px) {
  .coming-soon::before {
    font-size: 0.75rem;
    padding: 3px 6px;
    top: -25px;
  }
  
  .coming-soon::after {
    top: -8px;
    border-width: 3px;
  }
}

@media (max-width: 480px) {
  .coming-soon::before {
    font-size: 0.7rem;
    padding: 2px 5px;
    top: -22px;
  }
  
  .coming-soon::after {
    top: -7px;
    border-width: 2px;
  }
}

/* Light theme overrides */
body.light-theme .form-control {
  color: var(--text-dark);
  background-color: var(--light-panel);
  border-color: var(--light-border);
}

body.light-theme .form-control:focus {
  color: var(--text-dark);
  background-color: var(--light-panel);
}

body.light-theme .form-control::placeholder {
  color: var(--text-muted-dark);
}

body.light-theme .modal-content {
  background-color: var(--light-panel);
  color: var(--text-dark);
}

body.light-theme .modal-header {
  border-bottom-color: var(--light-border);
}

body.light-theme .modal-footer {
  border-top-color: var(--light-border);
}

body.light-theme .modal-title {
  color: var(--text-dark);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .form-group {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .form-group label {
    width: auto;
    margin-bottom: 0.5rem;
  }
  
  .modal-footer {
    flex-direction: column;
  }
  
  .modal-footer .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }
} 