/* ==========================================================================
   Odiwave Media - Agreement Signing Flow Stylesheet
   ========================================================================== */

.agreement-page { min-height: 100vh; padding-top: 76px; background: var(--gray-50); }
.agreement-page .site-footer { display: none; }

.agreement-container { max-width: 800px; margin: 0 auto; padding: 40px 20px 60px; }

/* ---------- Progress Bar ---------- */
.agreement-progress { margin-bottom: 48px; }
.progress-track { height: 4px; background: var(--gray-200); border-radius: 2px; margin-bottom: 20px; position: relative; }
.progress-fill { height: 100%; background: linear-gradient(135deg, var(--primary), var(--accent)); border-radius: 2px; transition: width 0.5s ease; width: 0%; }
.progress-steps { display: flex; justify-content: space-between; }
.ag-step { display: flex; flex-direction: column; align-items: center; gap: 8px; flex: 1; }
.ag-step-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--white); border: 3px solid var(--gray-300); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); font-size: 14px; font-weight: 800; color: var(--gray-400); transition: var(--transition); }
.ag-step.active .ag-step-circle { border-color: var(--primary); background: var(--primary); color: var(--white); box-shadow: 0 4px 15px rgba(37,99,235,0.3); }
.ag-step.completed .ag-step-circle { border-color: var(--success); background: var(--success); color: var(--white); }
.ag-step.completed .ag-step-circle::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; }
.ag-step span { font-size: 12px; color: var(--gray-400); font-weight: 500; text-align: center; }
.ag-step.active span { color: var(--primary); font-weight: 700; }
.ag-step.completed span { color: var(--success); }

/* ---------- Panels ---------- */
.ag-panel { display: none; background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-md); border: 1px solid var(--gray-200); overflow: hidden; animation: fadeIn 0.4s ease; }
.ag-panel.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.ag-panel-header { text-align: center; padding: 40px 30px 20px; }
.ag-panel-icon { width: 72px; height: 72px; background: linear-gradient(135deg, rgba(37,99,235,0.1), rgba(59,130,246,0.1)); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 20px; }
.ag-panel-icon i { font-size: 30px; color: var(--primary); }
.ag-panel-header h2 { font-family: var(--font-heading); font-size: 26px; font-weight: 800; color: var(--gray-900); margin-bottom: 8px; }
.ag-panel-header p { color: var(--gray-500); font-size: 15px; }

/* ---------- Agreement Form ---------- */
.ag-form { padding: 0 30px 30px; max-width: 500px; margin: 0 auto; }
.ag-form .form-group { margin-bottom: 20px; }
.ag-form label { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; }
.ag-form label i { color: var(--gray-400); font-size: 13px; }
.ag-form input { width: 100%; padding: 14px 16px; border: 2px solid var(--gray-200); border-radius: var(--radius); font-family: var(--font-primary); font-size: 15px; color: var(--gray-800); outline: none; transition: var(--transition); }
.ag-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.ag-form input::placeholder { color: var(--gray-400); }

.ag-info-box { display: flex; gap: 12px; padding: 14px 18px; background: rgba(74,144,217,0.06); border: 1px solid rgba(74,144,217,0.15); border-radius: var(--radius); margin-bottom: 24px; }
.ag-info-box i { color: var(--info); margin-top: 2px; flex-shrink: 0; }
.ag-info-box p { color: var(--gray-600); font-size: 13px; line-height: 1.6; margin: 0; }

/* ---------- Contract Scroll ---------- */
.ag-contract-scroll { padding: 0 30px; margin-bottom: 0; position: relative; }
.contract-document { max-height: 400px; overflow-y: auto; padding: 30px; background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); }
.contract-document::-webkit-scrollbar { width: 6px; }
.contract-document::-webkit-scrollbar-track { background: var(--gray-100); border-radius: 3px; }
.contract-document::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: 3px; }
.contract-document::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

.contract-header { text-align: center; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 2px solid var(--gray-200); }
.contract-header h3 { font-family: var(--font-heading); font-size: 22px; color: var(--primary); }
.contract-date { color: var(--gray-500); font-size: 14px; margin-top: 4px; }
.contract-party { margin-bottom: 20px; padding: 16px; background: var(--white); border-radius: var(--radius-sm); }
.contract-party p { margin-bottom: 8px; color: var(--gray-700); font-size: 14px; }
.contract-section { margin-bottom: 20px; }
.contract-section h4 { font-family: var(--font-heading); font-size: 16px; color: var(--gray-900); margin-bottom: 8px; }
.contract-section p { color: var(--gray-600); font-size: 14px; line-height: 1.7; }
.contract-section ul { padding-left: 20px; margin-top: 8px; }
.contract-section ul li { color: var(--gray-600); font-size: 14px; line-height: 1.7; margin-bottom: 6px; }

.scroll-indicator { text-align: center; padding: 12px; color: var(--gray-400); font-size: 13px; animation: bounce 2s infinite; }
.scroll-indicator i { margin-right: 6px; }
@keyframes bounce { 0%,100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

.ag-contract-actions { display: flex; justify-content: space-between; padding: 20px 30px 30px; }
.ag-contract-actions .btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* ---------- OTP Section ---------- */
.otp-container { padding: 10px 30px 30px; max-width: 400px; margin: 0 auto; text-align: center; }
.otp-sent-info { margin-bottom: 30px; }
.otp-icon { width: 60px; height: 60px; background: rgba(39,174,96,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 16px; }
.otp-icon i { font-size: 24px; color: var(--success); }
.otp-sent-info p { color: var(--gray-700); font-size: 15px; margin-bottom: 4px; }
.otp-note { color: var(--gray-500) !important; font-size: 13px !important; }

.otp-input-group { display: flex; justify-content: center; gap: 10px; margin-bottom: 20px; }
.otp-digit { width: 52px; height: 60px; border: 2px solid var(--gray-300); border-radius: var(--radius); text-align: center; font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--gray-900); outline: none; transition: var(--transition); }
.otp-digit:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,0.1); }
.otp-digit.filled { border-color: var(--primary); background: rgba(37,99,235,0.03); }
.otp-digit.error { border-color: var(--danger); animation: shake 0.4s ease; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.otp-error { color: var(--danger); font-size: 14px; margin-bottom: 16px; }

.otp-timer { margin-bottom: 20px; color: var(--gray-500); font-size: 14px; }
.otp-timer strong { color: var(--primary); }

/* ---------- Sign Section ---------- */
.ag-sign-summary { padding: 10px 30px 30px; }
.sign-detail-card { background: var(--gray-50); border-radius: var(--radius); padding: 24px; margin-bottom: 24px; }
.sign-detail-card h4 { font-family: var(--font-heading); font-size: 16px; color: var(--gray-800); margin-bottom: 16px; }
.sign-details { display: flex; flex-direction: column; gap: 10px; }
.sign-detail-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--gray-200); }
.sign-detail-row:last-child { border-bottom: none; }
.sign-label { color: var(--gray-500); font-size: 14px; }
.sign-value { color: var(--gray-800); font-size: 14px; font-weight: 600; }
.sign-value.verified { color: var(--success); }
.sign-value.verified i { margin-right: 4px; }

.agree-checkbox-group { margin-bottom: 24px; }
.agree-checkbox { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 18px; background: rgba(37,99,235,0.03); border: 2px solid var(--gray-200); border-radius: var(--radius); transition: var(--transition); }
.agree-checkbox:has(input:checked) { border-color: var(--primary); background: rgba(37,99,235,0.05); }
.agree-checkbox input { display: none; }
.agree-checkmark { width: 24px; height: 24px; border: 2px solid var(--gray-300); border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 2px; transition: var(--transition); }
.agree-checkbox input:checked + .agree-checkmark { background: var(--primary); border-color: var(--primary); }
.agree-checkbox input:checked + .agree-checkmark::after { content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--white); font-size: 12px; }
.agree-checkbox span:last-child { font-size: 14px; color: var(--gray-600); line-height: 1.6; }

/* ---------- Success ---------- */
.ag-success { text-align: center; padding: 50px 30px; }
.success-animation { margin-bottom: 24px; }
.success-circle { width: 100px; height: 100px; background: linear-gradient(135deg, var(--success), #2ECC71); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto; animation: scaleIn 0.5s ease; }
.success-circle i { font-size: 44px; color: var(--white); }
@keyframes scaleIn { from { transform: scale(0); } to { transform: scale(1); } }

.ag-success h2 { font-family: var(--font-heading); font-size: 28px; font-weight: 800; color: var(--gray-900); margin-bottom: 12px; }
.ag-success > p { color: var(--gray-500); font-size: 15px; margin-bottom: 30px; }

.success-details { display: flex; flex-direction: column; gap: 12px; margin-bottom: 36px; max-width: 360px; margin-left: auto; margin-right: auto; }
.success-detail { display: flex; align-items: center; gap: 12px; padding: 12px 18px; background: var(--gray-50); border-radius: var(--radius); }
.success-detail i { color: var(--success); font-size: 18px; }
.success-detail span { color: var(--gray-700); font-size: 14px; }

.success-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .agreement-container { padding: 24px 16px 40px; }
    .ag-panel-header { padding: 30px 20px 16px; }
    .ag-panel-header h2 { font-size: 22px; }
    .ag-form { padding: 0 20px 20px; }
    .ag-contract-scroll { padding: 0 20px; }
    .ag-contract-actions { padding: 16px 20px 20px; }
    .ag-sign-summary { padding: 10px 20px 20px; }
    .otp-container { padding: 10px 20px 20px; }
    .otp-digit { width: 44px; height: 52px; font-size: 20px; }
    .progress-steps { gap: 4px; }
    .ag-step span { font-size: 10px; }
    .success-actions { flex-direction: column; }
    .success-actions .btn { width: 100%; justify-content: center; }
}
