/**
 * NEW MATRIX CAPITAL - Terms Agreement
 * Professional bank-style, ultra-fast scroll
 */

/* Container */
.terms-agreement-section {
  background: #fff;
  border: 1px solid #d4d4d4;
  border-radius: 6px;
  margin: 20px 0;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Header */
.terms-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: #f7f8f9;
  border-bottom: 1px solid #e5e5e5;
}

.terms-title {
  font-size: 12px;
  font-weight: 600;
  color: #0A2647;
  letter-spacing: 0.02em;
}

.scroll-indicator {
  font-size: 11px;
  font-weight: 600;
  color: #666;
  background: #e8e8e8;
  padding: 3px 8px;
  border-radius: 10px;
  min-width: 28px;
  text-align: center;
}

.scroll-indicator.done {
  background: #d4edda;
  color: #155724;
}

/* Scroll Box - ULTRA FAST */
.terms-scroll-box {
  height: 300px;
  overflow-y: scroll !important;
  overflow-x: hidden;
  padding: 16px 20px;
  background: #fcfcfc;
  font-size: 11px;
  line-height: 1.55;
  color: #444;
  scroll-behavior: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Fast thin scrollbar */
.terms-scroll-box::-webkit-scrollbar { width: 6px; }
.terms-scroll-box::-webkit-scrollbar-track { background: #eee; }
.terms-scroll-box::-webkit-scrollbar-thumb { background: #999; border-radius: 3px; }
.terms-scroll-box::-webkit-scrollbar-thumb:hover { background: #666; }
.terms-scroll-box { scrollbar-width: thin; scrollbar-color: #999 #eee; }

/* Document Styles */
.terms-document {
  font-family: 'Times New Roman', Times, Georgia, serif;
}

.terms-document h1 {
  font-size: 14px;
  font-weight: 700;
  color: #0A2647;
  text-align: center;
  margin: 0 0 4px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.terms-document .terms-meta {
  text-align: center;
  font-size: 10px;
  color: #666;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e5e5e5;
}

.terms-document h2 {
  font-size: 12px;
  font-weight: 700;
  color: #0A2647;
  margin: 16px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding-bottom: 4px;
  border-bottom: 1px solid #e8e8e8;
}

.terms-document h3 {
  font-size: 11px;
  font-weight: 700;
  color: #0A2647;
  margin: 14px 0 6px;
  text-transform: uppercase;
}

.terms-document h4 {
  font-size: 10.5px;
  font-weight: 600;
  color: #333;
  margin: 10px 0 4px;
}

.terms-document p {
  margin-bottom: 8px;
  text-align: justify;
}

.terms-document ul, .terms-document ol {
  margin: 6px 0 10px 20px;
  padding: 0;
}

.terms-document li {
  margin-bottom: 4px;
}

.terms-document hr {
  border: none;
  border-top: 1px solid #e5e5e5;
  margin: 16px 0;
}

.terms-document strong {
  color: #222;
  font-weight: 700;
}

.terms-document em {
  font-style: italic;
  color: #555;
}

.terms-document a {
  color: #2563eb;
  text-decoration: none;
}

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

.terms-end {
  text-align: center;
  padding: 20px 0 10px;
  color: #666;
  font-size: 10px;
}

.terms-end p { margin: 4px 0; }

/* Consent Checkboxes */
.terms-consent {
  padding: 14px 16px;
  background: #fff;
  border-top: 1px solid #e5e5e5;
}

.terms-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 6px;
  background: #f8f9fa;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.4;
  color: #444;
  transition: border-color 0.1s, background 0.1s;
}

.terms-checkbox:last-child { margin-bottom: 0; }
.terms-checkbox:hover { background: #f0f2f4; border-color: #ccc; }

.terms-checkbox.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f5f5f5;
}
.terms-checkbox.disabled:hover { background: #f5f5f5; border-color: #e5e5e5; }

.terms-checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: #0A2647;
  flex-shrink: 0;
  cursor: pointer;
}

.terms-checkbox input:disabled { cursor: not-allowed; }
.terms-checkbox span { flex: 1; }
.terms-checkbox a { color: #2563eb; text-decoration: none; }
.terms-checkbox a:hover { text-decoration: underline; }

/* E-Signature Section */
.esign-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.esign-row {
  display: flex;
  gap: 12px;
  margin-bottom: 8px;
}

.esign-field {
  flex: 1;
}

.esign-field label {
  display: block;
  font-size: 11px;
  color: #666;
  margin-bottom: 4px;
  font-weight: 500;
}

.esign-field input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d4d4d4;
  border-radius: 4px;
  font-size: 12px;
  background: #fff;
}

.esign-field input:focus {
  outline: none;
  border-color: #0A2647;
}

.esign-field input[readonly] {
  background: #f5f5f5;
  color: #666;
}

/* Links */
.terms-links {
  padding: 10px 14px;
  border-top: 1px solid #f0f0f0;
  text-align: center;
  background: #f8f9fa;
}

.terms-links a {
  color: #666;
  text-decoration: none;
  font-size: 10px;
  margin: 0 10px;
}

.terms-links a:hover { color: #0A2647; text-decoration: underline; }

/* Mobile */
@media (max-width: 640px) {
  .terms-scroll-box {
    height: 240px;
    padding: 12px 14px;
    font-size: 10px;
  }
  
  .terms-checkbox {
    padding: 8px 10px;
    font-size: 11px;
  }
  
  .esign-row { flex-direction: column; gap: 8px; }
  
  .terms-links a { font-size: 9px; margin: 0 6px; }
}
