﻿/* ===== ACCOUNT PROFILE MODAL ===== */

/* Overlay */
.ap-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}
.ap-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Modal */
.ap-modal {
  width: 520px;
  max-width: 96vw;
  max-height: 92vh;
  background: linear-gradient(145deg, #0f1923, #111c28);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.7), 0 0 0 1px rgba(0,200,83,0.05);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.92) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.ap-overlay.open .ap-modal {
  transform: scale(1) translateY(0);
}

/* Header */
.ap-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
}
.ap-header-title {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.3px;
}
.ap-close-btn {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text2, #8899aa);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.ap-close-btn:hover {
  background: rgba(255,80,80,0.15);
  border-color: rgba(255,80,80,0.3);
  color: #ff5050;
}

/* Scrollable body */
.ap-body {
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ap-body::-webkit-scrollbar { width: 4px; }
.ap-body::-webkit-scrollbar-track { background: transparent; }
.ap-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* ---- Profile Card ---- */
.ap-card {
  background: linear-gradient(135deg, rgba(0,200,83,0.08), rgba(0,149,255,0.06));
  border: 1px solid rgba(0,200,83,0.15);
  border-radius: 16px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
}
.ap-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(0,200,83,0.12), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

/* Avatar */
.ap-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.ap-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a2a3a, #0d1f2d);
  border: 3px solid rgba(0,200,83,0.4);
  box-shadow: 0 0 20px rgba(0,200,83,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ap-avatar svg {
  width: 38px;
  height: 38px;
  fill: rgba(255,255,255,0.3);
}
.ap-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ap-cam-btn {
  position: absolute;
  bottom: 0;
  right: -2px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #00c853, #008f3b);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  cursor: pointer;
  border: 2px solid #0f1923;
  transition: transform 0.2s;
}
.ap-cam-btn:hover { transform: scale(1.15); }

/* User info */
.ap-user-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.ap-email {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ap-id {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  font-weight: 500;
  font-family: 'Courier New', monospace;
  letter-spacing: 0.5px;
}
.ap-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  width: fit-content;
  margin-top: 2px;
}
.ap-status.unverified {
  background: rgba(255,80,80,0.12);
  border: 1px solid rgba(255,80,80,0.25);
  color: #ff6b6b;
}
.ap-status.pending {
  background: rgba(255,170,0,0.12);
  border: 1px solid rgba(255,170,0,0.25);
  color: #ffaa00;
}
.ap-status.verified {
  background: rgba(0,200,83,0.12);
  border: 1px solid rgba(0,200,83,0.25);
  color: #00c853;
}

/* ---- Section Titles ---- */
.ap-section-title {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 4px;
}

/* ---- User Information Form ---- */
.ap-info-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ap-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ap-field label {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ap-field input,
.ap-field textarea {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 11px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: all 0.25s;
  width: 100%;
  box-sizing: border-box;
}
.ap-field input::placeholder,
.ap-field textarea::placeholder {
  color: rgba(255,255,255,0.2);
}
.ap-field input:focus,
.ap-field textarea:focus {
  border-color: rgba(0,200,83,0.4);
  background: rgba(0,200,83,0.04);
  box-shadow: 0 0 0 3px rgba(0,200,83,0.08);
}
.ap-field input.filled,
.ap-field textarea.filled {
  border-color: rgba(0,200,83,0.3);
  background: rgba(0,200,83,0.04);
}
.ap-field textarea {
  min-height: 70px;
  resize: none;
}

/* Tick-button row */
.ap-field-row-input {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ap-field-row-input input,
.ap-field-row-input textarea {
  flex: 1;
  margin: 0;
}
.ap-field-row-input--textarea {
  align-items: flex-start;
}

/* Tick / Save button */
.ap-tick-btn {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1.5px solid rgba(0,200,83,0.3);
  background: rgba(0,200,83,0.08);
  color: #00c853;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  line-height: 1;
}
.ap-tick-btn:hover {
  background: rgba(0,200,83,0.2);
  border-color: rgba(0,200,83,0.6);
  transform: scale(1.08);
  box-shadow: 0 0 12px rgba(0,200,83,0.25);
}
.ap-tick-btn:active { transform: scale(0.96); }
.ap-tick-btn.saved {
  background: rgba(0,200,83,0.25);
  border-color: #00c853;
  color: #fff;
}
.ap-tick-btn--textarea {
  margin-top: 4px;
  height: 36px;
}

/* Saved badge (shown below field after tick) */
.ap-saved-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #00c853;
  background: rgba(0,200,83,0.1);
  border: 1px solid rgba(0,200,83,0.25);
  border-radius: 6px;
  padding: 3px 9px;
  margin-top: 2px;
  animation: savedPop 0.3s cubic-bezier(0.34,1.56,0.64,1);
  width: fit-content;
}
@keyframes savedPop {
  0% { transform: scale(0.7); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Verify button on info form */
.ap-verify-trigger-btn {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  margin-top: 4px;
  letter-spacing: 0.3px;
}
.ap-verify-trigger-btn:disabled {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.25);
  cursor: not-allowed;
  box-shadow: none;
}
.ap-verify-trigger-btn:not(:disabled) {
  background: linear-gradient(135deg, #00c853, #008f3b);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,200,83,0.3);
}
.ap-verify-trigger-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,200,83,0.4);
}

/* ---- Verification (NID Upload) Section ---- */
.ap-verify-section {
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ap-v-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}
.ap-v-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.6;
}

.ap-upload-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ap-upload-box {
  border: 2px dashed rgba(255,255,255,0.12);
  border-radius: 12px;
  padding: 20px 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.25s;
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.02);
  position: relative;
  overflow: hidden;
}
.ap-upload-box:hover {
  border-color: rgba(0,149,255,0.5);
  background: rgba(0,149,255,0.05);
}
.ap-upload-box.uploaded {
  border-color: rgba(0,200,83,0.5);
  background: rgba(0,200,83,0.05);
}
.ap-upload-box.uploaded .ap-upload-content { display: none; }
.ap-upload-box .ap-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  border-radius: 10px;
}
.ap-upload-icon {
  font-size: 24px;
  margin-bottom: 8px;
}
.ap-upload-lbl {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  margin-bottom: 4px;
}
.ap-upload-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
}
.ap-upload-check {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: #00c853;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}
.ap-upload-box.uploaded .ap-upload-check { display: flex; }

/* Submit button */
.ap-submit-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  border: none;
  transition: all 0.3s;
  letter-spacing: 0.3px;
}
.ap-submit-btn:disabled {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.25);
  cursor: not-allowed;
  box-shadow: none;
}
.ap-submit-btn:not(:disabled) {
  background: linear-gradient(135deg, #0095ff, #005eff);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,149,255,0.3);
}
.ap-submit-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0,149,255,0.4);
}

/* ---- Pending Screen ---- */
.ap-pending-screen {
  background: rgba(255,170,0,0.05);
  border: 1px solid rgba(255,170,0,0.2);
  border-radius: 14px;
  padding: 30px 20px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ap-pending-icon {
  font-size: 40px;
  animation: pendingSpin 2s linear infinite;
}
@keyframes pendingSpin {
  0%   { transform: rotate(0deg); }
  25%  { transform: rotate(15deg); }
  75%  { transform: rotate(-15deg); }
  100% { transform: rotate(0deg); }
}
.ap-pending-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffaa00;
}
.ap-pending-text {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  line-height: 1.7;
  max-width: 340px;
}

/* ---- Progress indicator for info form ---- */
.ap-fill-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  padding-top: 2px;
}
.ap-fill-hint span {
  color: #00c853;
  font-weight: 700;
}

/* Responsive mobile */
@media (max-width: 540px) {
  .ap-modal {
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
    align-self: flex-end;
    width: 100%;
  }
  .ap-overlay {
    align-items: flex-end;
  }
  .ap-upload-grid { grid-template-columns: 1fr 1fr; }
  .ap-field-row { grid-template-columns: 1fr; }
}
