/* ==========================================================================
   TRIAL FORM MODAL STYLES
   ========================================================================== */

/* Modal Overlay */
.trial-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.trial-modal-overlay.trial-show {
  display: flex;
  opacity: 1;
  visibility: visible;
}

/* Modal Content */
.trial-modal-content {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  transform: translateY(-20px);
  transition: transform 0.3s ease;
}

.trial-modal-overlay.trial-show .trial-modal-content {
  transform: translateY(0);
}

/* Modal Close Button */
.trial-modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  z-index: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.trial-modal-close:hover {
  background-color: #f5f5f5;
  color: #333;
}

/* Modal Header */
.trial-modal-header {
  padding: 40px 40px 20px;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.trial-modal-header h2 {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 700;
  color: #333;
  font-family: 'League Spartan', sans-serif;
}

.trial-modal-header p {
  margin: 0;
  color: #666;
  font-size: 16px;
  line-height: 1.5;
}

/* Form Container */
.trial-form {
  padding: 30px 40px 40px;
}

/* Form Groups */
.trial-form-group {
  margin-bottom: 24px;
}

.trial-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.trial-form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 14px;
  font-family: 'League Spartan', sans-serif;
}

.trial-required {
  color: #e74c3c;
}

.trial-form-group input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e1e5e9;
  border-radius: 8px;
  font-size: 16px;
  transition: all 0.2s ease;
  font-family: inherit;
  box-sizing: border-box;
  background-color: #fff;
}

.trial-form-group input:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  background-color: #fafbfc;
}

.trial-form-group input:invalid {
  border-color: #e74c3c;
}

.trial-form-group input:valid:not(:placeholder-shown) {
  border-color: #28a745;
}

/* Form Actions */
.trial-form-actions {
  text-align: center;
  margin-top: 32px;
}

/* Buttons */
.trial-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  font-family: 'League Spartan', sans-serif;
  text-decoration: none;
  transition: all 0.2s ease;
  min-width: 180px;
}

.trial-btn-primary {
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.trial-btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #0056b3, #004085);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

.trial-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Loading Animation */
.trial-loading {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: trial-spin 1s linear infinite;
  margin-right: 10px;
}

@keyframes trial-spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* Alert Messages */
.trial-alert {
  padding: 12px 16px;
  border-radius: 6px;
  margin: 20px 40px;
  font-size: 14px;
  font-weight: 500;
}

.trial-alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.trial-alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Success Section */
.trial-success-section {
  display: none;
  padding: 60px 40px;
  text-align: center;
}

.trial-success-section.trial-show {
  display: block;
}

.trial-success-content {
  max-width: 400px;
  margin: 0 auto;
}

.trial-success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: bold;
  margin: 0 auto 24px;
  animation: trial-success-pop 0.6s ease;
}

@keyframes trial-success-pop {
  0% {
    transform: scale(0);
    opacity: 0;
  }

  50% {
    transform: scale(1.1);
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.trial-success-section h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 700;
  color: #333;
  font-family: 'League Spartan', sans-serif;
}

.trial-success-section p {
  margin: 0 0 32px;
  color: #666;
  line-height: 1.6;
}

/* Download Link */
.trial-download-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 32px;
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  font-family: 'League Spartan', sans-serif;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.trial-download-link:hover {
  background: linear-gradient(135deg, #218838, #1e7e34);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(40, 167, 69, 0.4);
  color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
  .trial-modal-content {
    width: 95%;
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .trial-modal-header {
    padding: 30px 20px 15px;
  }

  .trial-modal-header h2 {
    font-size: 24px;
  }

  .trial-form {
    padding: 20px;
  }

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

  .trial-form-group {
    margin-bottom: 20px;
  }

  .trial-btn,
  .trial-download-link {
    width: 100%;
    padding: 14px 24px;
  }

  .trial-success-section {
    padding: 40px 20px;
  }

  .trial-alert {
    margin: 15px 20px;
  }
}

@media (max-width: 480px) {
  .trial-modal-close {
    top: 15px;
    right: 15px;
  }

  .trial-success-icon {
    width: 60px;
    height: 60px;
    font-size: 30px;
  }

  .trial-modal-header h2 {
    font-size: 20px;
  }
}

/* Animation pour l'overlay qui s'ouvre */
@keyframes trial-modal-fade-in {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }

  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

.trial-modal-overlay.trial-show {
  animation: trial-modal-fade-in 0.3s ease;
}