/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Reset and base styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
}

/* Container */
.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Hero section */
.hero {
  text-align: center;
  margin-bottom: 3rem;
  color: white;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  font-weight: 300;
}

/* Form container */
.form-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

/* Form styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #4a5568;
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-help {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
}

.form-help a {
  color: #667eea;
  text-decoration: none;
}

.form-help a:hover {
  text-decoration: underline;
}

/* Button styles */
.btn {
  padding: 0.75rem 2rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-copy {
  background: #48bb78;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-copy:hover {
  background: #38a169;
}

.btn-download {
  background: #3182ce;
  color: white;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-download:hover {
  background: #2c5282;
}

.form-actions {
  text-align: center;
}

/* Progress container */
.progress-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.progress-header h3 {
  color: #4a5568;
  font-size: 1.25rem;
  margin: 0;
}

.progress-counter {
  background: #f7fafc;
  color: #667eea;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.875rem;
  border: 2px solid #e2e8f0;
}

/* Progress bar */
.progress-bar {
  width: 100%;
  height: 20px;
  background: #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 1rem;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  transition: width 0.3s ease;
  width: 0%;
}

.progress-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #4a5568;
  font-weight: 600;
  font-size: 0.875rem;
  text-shadow: 0 1px 2px rgba(255,255,255,0.8);
}

.progress-text {
  text-align: center;
  color: #4a5568;
  font-weight: 500;
  font-size: 1rem;
}

/* Result container */
.result-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.result-success h3 {
  color: #48bb78;
  margin-bottom: 1rem;
  text-align: center;
}

.result-success p {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #4a5568;
}

/* Calendar URL display */
.calendar-url {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.url-input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  background: #f7fafc;
  font-family: monospace;
  font-size: 0.875rem;
}

/* Instructions */
.instructions {
  background: #f7fafc;
  border-radius: 8px;
  padding: 1.5rem;
  border-left: 4px solid #667eea;
}

.instructions h4 {
  margin-bottom: 1rem;
  color: #4a5568;
}

.instructions ul {
  list-style: none;
}

.instructions li {
  margin-bottom: 0.75rem;
  color: #6b7280;
}

.instructions strong {
  color: #4a5568;
}

/* Error container */
.error-container {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
  margin-bottom: 2rem;
}

.result-error h3 {
  color: #e53e3e;
  margin-bottom: 1rem;
  text-align: center;
}

.result-error p {
  text-align: center;
  color: #4a5568;
}

/* Responsive design */
@media (max-width: 640px) {
  .container {
    padding: 1rem 0.5rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .form-container,
  .progress-container,
  .result-container,
  .error-container {
    padding: 1.5rem;
  }
  
  .calendar-url {
    flex-direction: column;
  }
}
