/* ===== COMPONENT STYLES FOR INDEX2 ===== */

/* ===== IMAGE SLIDER ===== */
.image-slider {
  position: relative;
  width: 100%;
  margin: calc(var(--spacing-unit) * 5) 0;
  overflow: hidden;
  background: var(--bg-light);
  padding: calc(var(--spacing-unit) * 2.5) 0;
}

.slider-container {
  display: flex;
  transition: transform 0.3s ease-out;
  gap: calc(var(--spacing-unit) * 2.5);
  padding: 0 calc(var(--spacing-unit) * 2.5);
}

.slider-slide {
  flex: 0 0 auto;
  width: 280px;
  height: 280px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  transition: var(--transition-base);
  cursor: pointer;
}

.slider-slide:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.slider-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.95);
  border: 0;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  font-size: 20px;
  color: var(--text-primary);
  transition: var(--transition-base);
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.slider-nav:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.slider-nav.prev {
  left: 15px;
}

.slider-nav.next {
  right: 15px;
}

.slider-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.slider-progress {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.2);
  height: 4px;
  width: 200px;
  border-radius: 2px;
  overflow: hidden;
}

.slider-progress-bar {
  height: 100%;
  background: var(--primary-color);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* ===== MODAL SYSTEM ===== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: white;
  border-radius: var(--border-radius-lg);
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  animation: modalAppear 0.3s ease;
}

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

.modal-header {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3.75);
  border-radius: var(--border-radius-lg) var(--border-radius-lg) 0 0;
  position: relative;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5em;
  color: white;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: transparent;
  border: 0;
  color: white;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  width: 35px;
  height: 35px;
  border-radius: 50%;
  transition: var(--transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  background: rgba(255,255,255,0.2);
}

.modal-content {
  padding: calc(var(--spacing-unit) * 3.75);
  line-height: 1.6;
}

.modal-content h3 {
  color: var(--text-primary);
  margin: calc(var(--spacing-unit) * 2.5) 0 calc(var(--spacing-unit) * 1.25) 0;
  font-size: 1.2em;
}

.modal-content p {
  margin: calc(var(--spacing-unit) * 1.25) 0;
}

.modal-actions {
  padding: calc(var(--spacing-unit) * 2.5) calc(var(--spacing-unit) * 3.75);
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: calc(var(--spacing-unit) * 2);
  justify-content: flex-end;
}

.modal-btn {
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2.5);
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1em;
  border: 0;
  transition: var(--transition-base);
}

.modal-btn-primary {
  background: var(--primary-color);
  color: white;
}

.modal-btn-primary:hover {
  background: #5a6fd8;
}

.modal-btn-secondary {
  background: var(--bg-light);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.modal-btn-secondary:hover {
  background: #e9ecef;
}

/* ===== SINGLE FORM MODAL ===== */
.single-form-modal {
  max-width: 700px !important;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.single-form-container {
  padding: calc(var(--spacing-unit) * 2.5);
}

.single-form-container h2 {
  text-align: center;
  margin-bottom: calc(var(--spacing-unit) * 3.75);
}

/* Support Type Selector */
.support-type-selector {
  display: flex;
  gap: calc(var(--spacing-unit) * 1.25);
  margin-bottom: calc(var(--spacing-unit) * 3.75);
  border-radius: 10px;
  background: var(--bg-light);
  padding: 5px;
}

.support-type-btn {
  flex: 1;
  padding: calc(var(--spacing-unit) * 1.5) calc(var(--spacing-unit) * 2.5);
  border: none;
  background: transparent;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--spacing-unit));
  color: #666;
  font-weight: 600;
}

.support-type-btn.active {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.support-type-btn:hover:not(.active) {
  background: rgba(255,255,255,0.5);
}

/* Form Sections */
.form-section {
  margin-bottom: calc(var(--spacing-unit) * 3.75);
  padding-bottom: calc(var(--spacing-unit) * 3.75);
  border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 18px;
  color: var(--text-primary);
  margin-bottom: calc(var(--spacing-unit) * 2.5);
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--spacing-unit) * 2);
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  margin-bottom: calc(var(--spacing-unit) * 0.75);
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

.form-input {
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 15px;
  transition: var(--transition-base);
}

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

/* Reward Options */
.reward-options.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--spacing-unit) * 1.25);
  max-height: 200px;
  overflow-y: auto;
  padding-right: calc(var(--spacing-unit) * 1.25);
}

.reward-option-compact {
  padding: calc(var(--spacing-unit) * 2);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reward-option-compact:hover {
  border-color: var(--primary-color);
  background: var(--bg-light);
}

.reward-option-compact.selected {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

/* Donation Input */
.donation-input-wrapper {
  display: flex;
  gap: calc(var(--spacing-unit) * 1.25);
  margin-bottom: calc(var(--spacing-unit) * 2);
}

.donation-input-wrapper .form-input {
  flex: 1;
}

.currency-select {
  width: 120px;
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  font-size: 15px;
  background: white;
  cursor: pointer;
}

/* Suggested Amounts */
.suggested-amounts {
  display: flex;
  gap: calc(var(--spacing-unit) * 1.25);
  flex-wrap: wrap;
}

.amount-btn {
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  border: 1px solid var(--border-color);
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: var(--transition-base);
}

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

/* Payment Methods */
.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: calc(var(--spacing-unit) * 1.25);
}

.payment-method-btn {
  padding: calc(var(--spacing-unit) * 2);
  border: 2px solid var(--border-color);
  background: white;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--spacing-unit) * 0.625);
  font-size: 14px;
}

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

.payment-method-btn.active {
  border-color: var(--primary-color);
  background: linear-gradient(135deg, rgba(102,126,234,0.05) 0%, rgba(118,75,162,0.05) 100%);
}

/* Order Summary */
.order-summary {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 2.5);
  margin: calc(var(--spacing-unit) * 2.5) 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: calc(var(--spacing-unit) * 1.25);
  font-size: 15px;
}

.summary-line:last-child {
  margin-bottom: 0;
  font-weight: bold;
  font-size: 18px;
  padding-top: calc(var(--spacing-unit) * 1.25);
  border-top: 1px solid #dee2e6;
}

/* Large Form Button */
.form-btn.primary.large {
  width: 100%;
  padding: calc(var(--spacing-unit) * 2);
  font-size: 18px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  color: white;
  border: none;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition-base);
  font-weight: 600;
}

.form-btn.primary.large:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102,126,234,0.3);
}

.form-btn.primary.large:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Error Message */
.error-message {
  color: var(--danger-color);
  background: rgba(255,107,107,0.1);
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2);
  border-radius: var(--border-radius);
  font-size: 14px;
  margin-top: calc(var(--spacing-unit) * 1.25);
  display: none;
  border: 1px solid rgba(255,107,107,0.3);
}

.error-message.active {
  display: block;
}

/* Success Message */
.success-message {
  color: var(--success-color);
  background: rgba(76,175,80,0.1);
  padding: calc(var(--spacing-unit) * 1.25) calc(var(--spacing-unit) * 2);
  border-radius: var(--border-radius);
  font-size: 14px;
  margin-top: calc(var(--spacing-unit) * 1.25);
  display: none;
  border: 1px solid rgba(76,175,80,0.3);
}

.success-message.active {
  display: block;
}

/* Currency Switcher */
.currency-switcher {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1000;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-radius: 30px;
  padding: calc(var(--spacing-unit));
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 0.5);
}

.currency-switcher .exchange-rates-info {
  text-align: center;
  padding: 2px calc(var(--spacing-unit));
  color: #666;
  font-size: 10px;
  opacity: 0.8;
  margin-top: 2px;
  white-space: nowrap;
}

.currency-switcher .currency-buttons {
  display: flex;
  gap: calc(var(--spacing-unit) * 0.5);
}

.currency-btn {
  padding: calc(var(--spacing-unit)) calc(var(--spacing-unit) * 2);
  border: 0;
  background: transparent;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9em;
  transition: var(--transition-base);
  color: #666;
}

.currency-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 2px 8px rgba(102,126,234,0.3);
}

.currency-btn:hover:not(.active) {
  background: rgba(102,126,234,0.1);
  color: var(--primary-color);
}

/* Spinner */
.spinner {
  border: 3px solid rgba(0,0,0,0.1);
  border-radius: 50%;
  border-top: 3px solid var(--primary-color);
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: calc(var(--spacing-unit) * 2.5) auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Privacy Links */
.privacy-link {
  color: var(--primary-color);
  text-decoration: underline;
  cursor: pointer;
  font-size: 0.9em;
}

.privacy-link:hover {
  color: #5a6fd8;
}

/* Delivery Notice */
.delivery-notice {
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: var(--border-radius);
  padding: calc(var(--spacing-unit) * 2);
  margin-top: calc(var(--spacing-unit) * 2.5);
}

.delivery-notice p {
  margin: 0 0 calc(var(--spacing-unit) * 1.25) 0;
  color: #856404;
  font-weight: bold;
  font-size: 0.9em;
}

.delivery-notice label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  color: #856404;
}

.delivery-notice input[type="checkbox"] {
  margin-right: calc(var(--spacing-unit));
  margin-top: 2px;
}

.delivery-notice span {
  font-size: 0.85em;
}

/* ===== SINGLE FORM STYLES ===== */
/* Стили для единой формы поддержки проекта */

.single-form-modal {
  max-width: 700px !important;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}

.single-form-container {
  padding: 20px;
}

.support-type-selector {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-radius: 10px;
  background: #f8f9fa;
  padding: 5px;
}

.support-type-btn {
  flex: 1;
  padding: 12px 20px;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #666;
}

.support-type-btn.active {
  background: white;
  color: #667eea;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-section {
  margin-bottom: 30px;
  padding-bottom: 30px;
  border-bottom: 1px solid #e1e8ed;
}

.form-section:last-of-type {
  border-bottom: none;
}

.form-section h3 {
  font-size: 18px;
  color: #333;
  margin-bottom: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

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

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-label {
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
  font-weight: 500;
}

/* Компактные награды */
.reward-options.compact {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  max-height: 200px;
  overflow-y: auto;
  padding-right: 10px;
}

.reward-option-compact {
  padding: 15px;
  border: 2px solid #e1e8ed;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.reward-option-compact:hover {
  border-color: #667eea;
  background: #f8f9fa;
}

.reward-option-compact.selected {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.donation-input-wrapper {
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

.donation-input-wrapper .form-input {
  flex: 1;
}

.currency-select {
  width: 120px;
  padding: 10px 15px;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  font-size: 15px;
  background: white;
  cursor: pointer;
}

.suggested-amounts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.amount-btn {
  padding: 8px 16px;
  border: 1px solid #e1e8ed;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.amount-btn:hover {
  border-color: #667eea;
  color: #667eea;
}

.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.payment-method-btn {
  padding: 15px;
  border: 2px solid #e1e8ed;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  font-size: 14px;
}

.payment-method-btn:hover {
  border-color: #667eea;
}

.payment-method-btn.active {
  border-color: #667eea;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
}

.order-summary {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
  margin: 20px 0;
}

.summary-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 15px;
}

.summary-line:last-child {
  margin-bottom: 0;
  font-weight: bold;
  font-size: 18px;
  padding-top: 10px;
  border-top: 1px solid #dee2e6;
}

.form-btn.primary.large {
  width: 100%;
  padding: 15px;
  font-size: 18px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-btn.primary.large:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.form-btn.primary.large:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* Адаптивность единой формы для мобильных */
@media (max-width: 768px) {
  .single-form-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100%;
    border-radius: 0;
  }
  
  .form-grid {
    grid-template-columns: 1fr;
  }
  
  .payment-methods {
    grid-template-columns: 1fr;
  }
  
  .support-type-selector {
    flex-direction: column;
  }
  
  .suggested-amounts {
    justify-content: space-between;
  }
  
  .amount-btn {
    flex: 1 1 calc(50% - 5px);
    text-align: center;
  }
}

/* Loading spinner for async resources */
.loading-spinner {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(102,126,234,0.2);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

body.loading .loading-spinner { display: block; }