/* ============================================= 
   CALENDAR STYLES - Pluggo
   ============================================= */

/* Calendar Section */
.calendar-section {
  padding: 4rem 5%;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  position: relative;
  overflow: hidden;
}

.calendar-container {
  max-width: 1200px;
  margin: 0 auto;
}

.calendar-header {
  text-align: center;
  margin-bottom: 3rem;
}

.calendar-header h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 900;
  color: var(--dark);
  margin-bottom: 1rem;
}

.calendar-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Calendar Layout */
.calendar-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  background: white;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-2xl);
}

/* Left Panel */
.calendar-left-panel {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  padding: 3rem 2rem;
  color: white;
}

.calendar-left-panel h3 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 2rem;
}

.calendar-benefits {
  list-style: none;
  margin-bottom: 2rem;
}

.calendar-benefits li {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  margin-bottom: 1rem;
  font-size: 1rem;
  line-height: 1.6;
}

.calendar-benefits li svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  stroke: #34D399;
  stroke-width: 2.5;
}

.calendar-testimonial {
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin: 2rem 0;
  backdrop-filter: blur(10px);
}

.calendar-testimonial p {
  font-style: italic;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.calendar-testimonial cite {
  font-size: 0.875rem;
  opacity: 0.9;
  font-style: normal;
}

.calendar-no-card {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  opacity: 0.9;
}

.calendar-no-card svg {
  width: 18px;
  height: 18px;
}

/* Right Panel */
.calendar-right-panel {
  padding: 3rem 2rem;
}

/* Progress Bar */
.calendar-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 3rem;
  position: relative;
}

.calendar-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--gray-300);
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.progress-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--gray-300);
  border: 3px solid white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gray-600);
  transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.progress-step.completed .progress-circle {
  background: var(--secondary);
  color: white;
}

.progress-step.completed .progress-circle::after {
  content: '✓';
}

.progress-label {
  font-size: 0.75rem;
  color: var(--gray-600);
  font-weight: 600;
  text-align: center;
}

.progress-step.active .progress-label {
  color: var(--primary);
}

/* Calendar Steps */
.calendar-step {
  display: none;
}

.calendar-step.active {
  display: block;
  animation: slideInUp 0.4s ease;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Date Grid */
.date-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.date-card {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 1rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.date-card:hover {
  border-color: var(--primary);
  background: var(--gray-50);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.date-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  color: white;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2);
}

.date-weekday {
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.date-number {
  font-size: 1.75rem;
  font-weight: 900;
  margin: 0.25rem 0;
}

.date-month {
  font-size: 0.875rem;
  text-transform: capitalize;
  opacity: 0.9;
}

.date-slots {
  font-size: 0.75rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

/* Time Grid */
.time-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.time-card {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  padding: 0.875rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.time-card:hover {
  border-color: var(--primary);
  background: var(--gray-50);
  transform: translateY(-2px);
}

.time-card.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Form */
.calendar-form {
  display: grid;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-700);
}

.form-group input,
.form-group select {
  padding: 0.875rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 1rem;
  transition: all 0.3s ease;
  font-family: var(--font-sans);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Selection Summary */
#selectionSummary {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
  border: 2px solid var(--primary-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.summary-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--primary-dark);
}

.summary-item svg {
  flex-shrink: 0;
  stroke: var(--primary);
}

/* Buttons */
.calendar-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
}

.btn-back {
  flex: 1;
  padding: 0.875rem 1.5rem;
  background: transparent;
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-weight: 600;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-back:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-continue,
.btn-submit {
  flex: 2;
  padding: 0.875rem 1.5rem;
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 700;
  font-size: 1rem;
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-md);
}

.btn-continue:hover,
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-continue:disabled,
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 0.5rem;
  vertical-align: middle;
}

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

/* Success Message */
.success-message {
  display: none;
  text-align: center;
  padding: 3rem 2rem;
}

.success-message.show {
  display: block;
  animation: slideInUp 0.6s ease;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.05) 100%);
  border: 3px solid var(--secondary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.success-icon::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--secondary);
  opacity: 0.3;
  animation: successPulse 2s ease-out infinite;
}

@keyframes successPulse {
  0% { transform: scale(1); opacity: 0.3; }
  100% { transform: scale(1.3); opacity: 0; }
}

.success-icon svg {
  stroke: var(--secondary);
}

.success-message h3 {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
}

.success-message p {
  font-size: 1.1rem;
  color: var(--gray-600);
  line-height: 1.6;
}

/* Loader */
#calendarLoader {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.loader-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Notifications */
.notification {
  position: fixed;
  top: 2rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  z-index: 10000;
  font-weight: 600;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  max-width: 400px;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

.notification-error {
  border-left: 4px solid #EF4444;
  color: #991B1B;
}

.notification-success {
  border-left: 4px solid var(--secondary);
  color: #065F46;
}

.notification-info {
  border-left: 4px solid var(--primary);
  color: var(--primary-dark);
}

/* Error Message */
.error-message {
  text-align: center;
  padding: 3rem 2rem;
}

.error-message svg {
  stroke: #EF4444;
  margin-bottom: 1.5rem;
}

.error-message p {
  font-size: 1.125rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.btn-retry {
  padding: 0.875rem 2rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-retry:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 968px) {
  .calendar-layout {
    grid-template-columns: 1fr;
  }

  .calendar-left-panel {
    padding: 2rem 1.5rem;
  }

  .date-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .time-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .calendar-section {
    padding: 2rem 5%;
  }

  .date-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .time-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .calendar-buttons {
    flex-direction: column;
  }

  .btn-back,
  .btn-continue,
  .btn-submit {
    width: 100%;
  }

  .notification {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}
