/**
 * Phonee Pee - styles (Navy Blue theme per CLAUDE.md)
 * Rameez Scripts
 */

:root { --navy-primary: #001f3f; --navy-dark: #001529; --navy-light: #003366; --navy-accent: #0074D9; --navy-hover: #002a52; --success: #34a853; --warning: #fbbc04; --danger: #ea4335; }
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; -moz-text-size-adjust: 100%; text-size-adjust: 100%; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f5f5f5; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }

input, select, textarea { font-size: 16px !important; touch-action: manipulation; }

/* Login-style container (reused for payment form + result) */
.login-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-light) 100%); }
.login-box { background: white; padding: 50px 40px; border-radius: 4px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); width: 100%; max-width: 460px; text-align: center; }
.login-logo { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; margin-bottom: 25px; border: 3px solid var(--navy-primary); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.login-box h2 { margin-bottom: 8px; color: var(--navy-primary); font-size: 26px; font-weight: 600; }
.login-sub { color: #666; font-size: 14px; margin-bottom: 28px; }

/* Forms */
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { display: block; margin-bottom: 8px; color: #555; font-weight: 500; font-size: 14px; }
.form-group label i { color: var(--navy-accent); margin-right: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 14px 16px; border: 1px solid #d0d0d0; border-radius: 2px; font-size: 16px; transition: all 0.3s; font-family: inherit; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: var(--navy-accent); box-shadow: 0 0 0 2px rgba(0,116,217,0.1); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.form-actions { display: flex; gap: 10px; margin-top: 30px; }
.error { margin-top: 15px; color: var(--danger); font-size: 14px; }

/* Buttons */
.btn { padding: 10px 20px; border: none; border-radius: 2px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.3s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; touch-action: manipulation; -webkit-tap-highlight-color: transparent; text-decoration: none; }
.btn-primary { background: var(--navy-primary); color: white; }
.btn-primary:hover { background: var(--navy-hover); transform: translateY(-2px); }
.btn-success { background: var(--success); color: white; }
.btn-danger  { background: var(--danger);  color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn:disabled { background: #ccc; cursor: not-allowed; }
.btn-sm { padding: 8px 16px; font-size: 13px; font-weight: 600; }
.btn-block { width: 100%; padding: 14px; font-size: 15px; }

/* Status Badge */
.status-badge { padding: 6px 14px; border-radius: 3px; font-size: 13px; font-weight: 600; display: inline-block; }
.status-active   { background: #d4edda; color: #155724; }
.status-inactive { background: #f8d7da; color: #721c24; }
.status-success  { background: #d4edda; color: #155724; }
.status-pending  { background: #fff3cd; color: #7a5b00; }
.status-failed   { background: #f8d7da; color: #721c24; }
.status-unknown  { background: #e2e3e5; color: #41464b; }

/* About card (used for info/notes) */
.about-card { background: white; border-radius: 4px; padding: 25px; margin-bottom: 20px; box-shadow: 0 2px 8px rgba(0,0,0,0.08); border-left: 4px solid var(--navy-primary); text-align: left; }
.about-card h2 { color: var(--navy-primary); font-size: 20px; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.about-card p { color: #555; line-height: 1.7; font-size: 15px; }
.about-features { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.about-features li { padding: 12px 14px; background: #f8f9fa; border-radius: 4px; color: #333; font-size: 13px; font-weight: 600; display: flex; align-items: center; }
.about-features li i { color: var(--navy-primary); margin-right: 10px; font-size: 14px; flex-shrink: 0; }

/* About-style table (used for result details) */
.about-table-wrapper { overflow-x: auto; margin: 15px 0; }
.about-roles-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.about-roles-table th, .about-roles-table td { padding: 12px 15px; text-align: center; border: 1px solid #e0e0e0; }
.about-roles-table th { background: var(--navy-primary); color: white; font-weight: 600; }
.about-roles-table th:first-child { text-align: left; }
.about-roles-table td:first-child { text-align: left; font-weight: 500; background: #f8f9fa; }

/* Loading popup (floating, not full dim) */
.loading-ov { position: fixed; inset: 0; display: flex; justify-content: center; align-items: center; z-index: 10001; }
.loading-popup { background: white; padding: 30px 40px; border-radius: 4px; box-shadow: 0 4px 24px rgba(0,0,0,0.18); display: flex; flex-direction: column; align-items: center; min-width: 240px; }
.loading-progress { width: 200px; height: 6px; border-radius: 2px; background: #e0e0e0; overflow: hidden; margin-bottom: 16px; }
.loading-progress-bar { width: 100%; height: 100%; background: var(--navy-accent); border-radius: 2px; animation: progressIndeterminate 1.5s ease-in-out infinite; transform-origin: left; }
@keyframes progressIndeterminate { 0% { transform: translateX(-100%) scaleX(0.4); } 50% { transform: translateX(20%) scaleX(0.5); } 100% { transform: translateX(100%) scaleX(0.4); } }
.loading-txt { font-size: 15px; color: #555; font-weight: 500; }

/* ===== payment-page specifics (additions) ===== */

/* amount input w/ rupee prefix */
.amount-box { position: relative; }
.amount-box .rupee { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 700; color: var(--navy-primary); z-index: 1; }
.amount-box input { padding-left: 38px !important; font-size: 22px !important; font-weight: 700; color: var(--navy-primary); }

/* quick amount chips */
.quick-amt { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 8px; }
.quick-amt button { padding: 8px 4px; border: 1.5px solid #ced4da; background: #f8f9fa; color: var(--navy-primary); border-radius: 3px; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; touch-action: manipulation; }
.quick-amt button:hover { border-color: var(--navy-accent); background: rgba(0,116,217,0.08); color: var(--navy-accent); }
.quick-amt button:active { transform: scale(0.96); }

/* secure note */
.secure-note { text-align: center; color: #888; font-size: 12px; margin-top: 16px; display: flex; align-items: center; justify-content: center; gap: 6px; }
.secure-note i { color: var(--success); }

/* result card variants - reuses .login-box frame */
.result-icon { font-size: 76px; margin-bottom: 10px; animation: popIn 0.45s cubic-bezier(0.3,1.4,0.5,1); }
.result-icon.success { color: var(--success); }
.result-icon.pending { color: var(--warning); }
.result-icon.fail    { color: var(--danger); }
@keyframes popIn { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: scale(1); } }

/* error debug block */
.err-debug { margin: 14px 0; padding: 12px; background: #f8f9fa; border: 1px solid #e0e0e0; border-radius: 3px; font-size: 11px; color: #5a6474; max-height: 180px; overflow: auto; white-space: pre-wrap; word-break: break-all; text-align: left; font-family: SFMono-Regular, Consolas, monospace; }

/* ===== Mobile ===== */
@media (max-width: 768px) {
  .login-box { padding: 32px 22px; max-width: 100%; }
  .login-box h2 { font-size: 22px; }
  .login-logo { width: 90px; height: 90px; }
  .form-grid { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }

  input, select, textarea { font-size: 16px !important; }
  .form-group input, .form-group select, .form-group textarea { font-size: 16px !important; padding: 12px 14px; }
}
