/* Terms & Conditions Modal Styles */

.terms-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

.terms-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.terms-modal-content {
  position: relative;
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

.terms-modal-header {
  padding: 24px 32px;
  border-bottom: 2px solid #e5e7eb;
}

.terms-modal-header h2 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #111827;
}

.terms-scroll-instruction {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

.terms-scroll-container {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
  scroll-behavior: smooth;
}

.terms-text {
  color: #374151;
  line-height: 1.7;
}

.terms-text h3 {
  margin: 32px 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.terms-text h3:first-child {
  margin-top: 0;
}

.terms-text p {
  margin: 16px 0;
}

.terms-text ul {
  margin: 12px 0;
  padding-left: 24px;
}

.terms-text li {
  margin: 8px 0;
}

.terms-text a {
  color: #1DD1BD;
  text-decoration: none;
}

.terms-text a:hover {
  text-decoration: underline;
}

.terms-text hr {
  margin: 32px 0;
  border: none;
  border-top: 2px solid #e5e7eb;
}

.terms-text strong {
  color: #111827;
  font-weight: 600;
}

.terms-acceptance-statement {
  background: #f0fdfa;
  border-left: 4px solid #1DD1BD;
  padding: 16px;
  margin: 32px 0 0 0;
  border-radius: 4px;
}

.terms-bottom-marker {
  display: none;
  background: #d1fae5;
  border: 2px solid #10b981;
  border-radius: 8px;
  padding: 16px;
  margin: 24px 0;
  text-align: center;
  font-weight: 600;
  color: #065f46;
  animation: fadeIn 0.3s ease;
}

.terms-modal-footer {
  padding: 24px 32px;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 12px 12px;
}

.terms-scroll-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #6b7280;
  font-size: 14px;
  font-weight: 500;
}

.scroll-arrow {
  font-size: 20px;
  animation: bounce 2s infinite;
}

.terms-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.terms-actions button {
  padding: 12px 32px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-cancel {
  background: white;
  color: #6b7280;
  border: 2px solid #d1d5db;
}

.btn-cancel:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.btn-accept {
  background: #d1d5db;
  color: #9ca3af;
  cursor: not-allowed;
}

.btn-accept.enabled {
  background: #1DD1BD;
  color: white;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(29, 209, 189, 0.3);
}

.btn-accept.enabled:hover {
  background: #1ac0a9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(29, 209, 189, 0.4);
}

.btn-accept:disabled {
  opacity: 0.6;
}

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

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

.shake {
  animation: shake 0.5s ease;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-10px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(10px);
  }
}

/* Custom scrollbar for terms container */
.terms-scroll-container::-webkit-scrollbar {
  width: 8px;
}

.terms-scroll-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.terms-scroll-container::-webkit-scrollbar-thumb {
  background: #1DD1BD;
  border-radius: 4px;
}

.terms-scroll-container::-webkit-scrollbar-thumb:hover {
  background: #1ac0a9;
}

/* Responsive */
@media (max-width: 768px) {
  .terms-modal-content {
    width: 95%;
    max-height: 90vh;
  }

  .terms-modal-header {
    padding: 20px 24px;
  }

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

  .terms-scroll-container {
    padding: 24px;
  }

  .terms-modal-footer {
    padding: 20px 24px;
  }

  .terms-actions {
    flex-direction: column;
  }

  .terms-actions button {
    width: 100%;
  }
}
