* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #f3f4f6;
  color: #222;
  padding: 20px;
}

.container {
  display: flex;
  max-width: 1600px;
  margin: 0 auto;
  gap: 20px;
}

.sidebar {
  flex: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.sidebar h2 {
  margin-bottom: 20px;
  color: #0077cc;
}

.sidebar label {
  display: block;
  margin-bottom: 15px;
  font-size: 14px;
}

.sidebar input,
.sidebar textarea {
  width: 100%;
  margin-top: 5px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.sidebar button {
  margin-top: 10px;
  padding: 10px 15px;
  background: #0077cc;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.preview {
  flex: 2;
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.cv-box h1 {
  font-size: 28px;
  color: #333;
}

.cv-box p {
  font-size: 14px;
  margin-top: 4px;
}

.cv-box h3 {
  margin-top: 20px;
  color: #0077cc;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
}
.layout-selection {
  max-width: 1100px;
  margin: auto;
  text-align: center;
  padding: 20px;
}

.layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  justify-items: center;
  padding: 10px;
}

.layout-card {
  position: relative;
  background: #fff;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 320px;
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.layout-card:hover {
  transform: translateY(-5px);
}

/* Image stays full size */
.layout-card img {
  width: 100%;
  border-radius: 10px;
  display: block;
}

/* Centered button - hidden by default */
.select-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #0077cc;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}

/* Show button only on hover */
.layout-card:hover .select-btn {
  opacity: 1;
  pointer-events: auto;
}

/* existing global styles remain ... */

.section {
  margin-bottom: 14px;
}

.acc-btn {
  width: 100%;
  text-align: left;
  background: #f5f7fb;
  border: 1px solid #e5e7eb;
  padding: 10px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  margin: 6px 0;
}

.acc-panel {
  display: none;
  padding: 10px 6px 0;

  max-height: none !important;
  overflow: visible !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.acc-panel.open {
  display: block !important;
}

.add-btn {
  margin-top: 10px;
  padding: 8px 12px;
  background: #eef6ff;
  color: #0a65cc;
  border: 1px dashed #0a65cc;
  border-radius: 6px;
  cursor: pointer;
}

.rep-item {
  border: 1px solid #e5e7eb;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  background: #fff;
}

.rep-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.rep-row > label {
  display: block;
  font-size: 13px;
}

.rep-row input,
.rep-row textarea,
.rep-row select {
  width: 100%;
  margin-top: 4px;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.rep-actions {
  display: flex;
  justify-content: flex-end;
}

.rep-remove {
  background: #b42318 !important;
  color: #ffffff !important;
  border: 1px solid #ffdada;
  border-radius: 6px;
  padding: 6px 10px;
  cursor: pointer;
}

.a4 {
  background: #fff;
  padding: 28px;
  border-radius: 8px;
  min-height: 1000px;
}
.cv-header h1 {
  font-size: 28px;
  margin-bottom: 2px;
  color: #111;
}
.cv-header p {
  margin: 2px 0;
  color: #555;
}
.cv-section {
  margin-top: 18px;
}
.cv-section h3 {
  color: #0a65cc;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 4px;
  margin-bottom: 8px;
}
.cv-item {
  margin-bottom: 10px;
}
.cv-item h4 {
  margin: 0;
  font-size: 15px;
  color: #111;
}
.cv-item .meta {
  font-size: 12px;
  color: #666;
}

/* Layout themes (hook for your per-template styles) */
.layout1 .cv-header h1 {
  letter-spacing: 0.5px;
}
.layout2 .cv-header h1 {
  text-transform: uppercase;
}
.layout3 .cv-section h3 {
  color: #333;
  background: #f3f4f6;
  padding: 6px 8px;
  border-radius: 6px;
}

/* A4 canvas look for screen */
.cv-box.a4 {
  width: 794px; /* A4 portrait ~ 210mm -> ~794px @96dpi */
  min-height: 1123px; /* A4 height ~ 297mm -> ~1123px @96dpi */
  background: #fff;
  margin: 0 auto;
  box-shadow: 0 0 0.5cm rgba(0, 0, 0, 0.1);
  padding: 24px; /* apne layout ke hisaab se adjust */
}

/* Print rules */
@media print {
  body * {
    visibility: hidden;
  }
  #cvPreview,
  #cvPreview * {
    visibility: visible;
  }
  #cvPreview {
    position: absolute;
    left: 0;
    top: 0;
    margin: 0;
    box-shadow: none !important;
  }
  .no-print {
    display: none !important;
  }
}

/* optional: export waqt box-shadow remove */
.cv-box.exporting {
  box-shadow: none !important;
}

.layout-card.disabled {
  opacity: 0.5;
  pointer-events: none; /* pura card click nahi hoga */
}

.layout-card.disabled .select-btn {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Toast (bottom-right) */
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  min-width: 280px;
  max-width: 440px;
  background: #222;
  color: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font: 500 14px/1.4 system-ui, Segoe UI, Arial;
  display: none;
  z-index: 9999;
}
.toast.show {
  display: block;
  animation: toast-in 0.25s ease-out;
}
.toast.success {
  background: #136f30;
}
.toast.error {
  background: #c0392b;
}
.toast .title {
  font-weight: 700;
  margin-bottom: 6px;
}
.toast .msg {
  opacity: 0.95;
}
.toast .close {
  position: absolute;
  top: 6px;
  right: 10px;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
}

@keyframes toast-in {
  from {
    transform: translateY(6px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.is-invalid {
  outline: 2px solid #e74c3c !important;
  border-color: #e74c3c !important;
}

.error-box {
  background: #fdecea;
  border: 1px solid #f5c0b8;
  color: #8a1f17;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 8px 0;
  display: none;
}
.error-box.show {
  display: block;
}
.error-box h4 {
  margin: 0 0 6px;
  font-size: 14px;
}
.error-box ul {
  margin: 0 0 0 18px;
}

.is-invalid {
  outline: 1px solid #e74c3c !important;
  border-color: #e74c3c !important;
}

.error-txt {
  display: block;
  font: 500 12px/1.3 system-ui, Segoe UI;
  color: #c0392b;
  margin-top: 4px;
}

#acc-personal input:invalid,
#acc-personal textarea:invalid {
  outline: 1px solid #e74c3c;
  border-color: #e74c3c;
}

/* FAQ Section */
.faq-section {
  margin: 60px auto;
  max-width: 850px;
  padding: 20px;
  font-family: "Segoe UI", sans-serif;
}

.faq-section h2 {
  text-align: center;
  font-size: 32px;
  font-weight: 700;
  color: #0a65cc;
  margin-bottom: 10px;
}

.faq-intro {
  text-align: center;
  color: #555;
  margin-bottom: 30px;
  font-size: 16px;
}

.faq-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  background: #fff;
}

.faq-item {
  border-bottom: 1px solid #eee;
}

.faq-question {
  width: 100%;
  padding: 18px 20px;
  background: #fdfdfd;
  border: none;
  outline: none;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: #222;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s ease;
}

.faq-question:hover {
  background: #f0f6ff;
}

.faq-answer {
  display: none;
  padding: 15px 20px;
  background: #fff;
  font-size: 15px;
  color: #444;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  display: block;
  animation: fadeIn 0.3s ease;
}

.faq-item.active .faq-question .arrow {
  transform: rotate(45deg);
  color: #0a65cc;
}

.arrow {
  font-size: 22px;
  font-weight: bold;
  transition: transform 0.3s ease, color 0.2s ease;
}

/* ===== Confirm Modal ===== */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.confirm-overlay.show {
  display: flex;
}

.confirm-dialog {
  width: 420px;
  max-width: 90%;
  background: #0a65cc;
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.15);
  font-family: system-ui, Segoe UI, Arial, sans-serif;
}

.confirm-title {
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 8px;
  color: #111827;
}

.confirm-msg {
  font-size: 14px;
  line-height: 1.45;
  color: #ffffff;
  margin-bottom: 22px;
}

.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.confirm-actions .btn-ok,
.confirm-actions .btn-cancel {
  padding: 8px 14px;
  font-size: 14px;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

/* color modes */
.confirm-overlay.warning .confirm-title {
  color: #ffffff;
}
.confirm-overlay.success .confirm-title {
  color: #0f766e;
}
.confirm-overlay.info .confirm-title {
  color: #ffffff;
}
.confirm-overlay.error .confirm-title {
  color: #b91c1c;
}

.confirm-actions .btn-cancel {
  background: #e5e7eb;
  color: #111827;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.confirm-actions .btn-ok {
  background: #0a65cc;
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid #fff;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Watermark (logo) over the whole A4 preview)  */
#cvPreview {
  position: relative;
  overflow: hidden;
}

#cvPreview::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/Layouts/logo.png") center/55% no-repeat;
  opacity: 0.09;
  pointer-events: none;
  z-index: 0;

  filter: sepia(1) saturate(7000%) hue-rotate(190deg) brightness(0.95)
    contrast(0.9);
}

#cvPreview > .tpl,
#cvPreview > .cv7,
#cvPreview > .tpl-1,
#cvPreview > .tpl-3 {
  position: relative;
  z-index: 1;
}

@media print {
  #cvPreview::before {
    opacity: 0.05;
  }
}

#cvPreview.exporting::before {
  opacity: 0.05;
}

/* .ai-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
}
.ai-row input,
.ai-row select {
  flex: 1;
  padding: 6px 8px;
  margin-top: 10px;
}
#btnAI {
  padding: 6px 10px;
  background: #0a65cc;
  color: #fff;
  border: 0;
  border-radius: 4px;
  cursor: pointer;
}
#btnAI:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.ai-note {
  display: inline-block;
  margin-top: 4px;
  color: #6b7280;
} */

/* ——— Wrapper (soft border panel) ——— */
.ai-box {
  margin-top: 10px;
  background: #f9fbff;
  border: 1px solid #e5eef7;
  border-radius: 10px;
  padding: 12px;
}

/* ——— Row layout ——— */
.ai-row {
  /* display: flex; */
  gap: 10px;
  align-items: center;
}

.ai-field {
  position: relative;
  flex: 1;
}

.ai-control {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #d6dfeb;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: 400 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
.ai-control::placeholder {
  color: #94a3b8;
}

.ai-control:focus {
  border: 2px solid #0a65cc;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
}
.ai-control:hover {
  border-color: #0a65cc;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
}

.ai-control[type="text"] {
  appearance: none;
}
.ai-control[type="email"] {
  appearance: none;
}
.ai-control[type="tel"] {
  appearance: none;
}
.ai-control[type="number"] {
  appearance: none;
}
.ai-control[type="search"] {
  appearance: none;
}
.ai-control[type="url"] {
  appearance: none;
}
.ai-control[type="password"] {
  appearance: none;
}

.ai-control::-ms-expand {
  display: none;
}
.ai-field select.ai-control {
  background-image: linear-gradient(0deg, transparent 50%, #ffffff 50%),
    linear-gradient(135deg, #ffffff 50%, transparent 50%),
    linear-gradient(to right, #d1d5db, #d1d5db);
  background-position: calc(100% - 16px) calc(50% - 4px),
    calc(100% - 12px) calc(50% - 4px), calc(100% - 32px) 50%;
  background-size: 6px 6px, 6px 6px, 1px 70%;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.btn-ai {
  height: 40px;
  padding: 0 14px;
  min-width: 160px;
  white-space: nowrap;
  border: none;
  border-radius: 6px;
  color: #fff;
  background: #0a65cc;
  font: 600 14px/1 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  cursor: pointer;
  transition: background 0.2s, transform 0.04s, box-shadow 0.2s;
}
.btn-ai:hover {
  background: #0b57ac;
  box-shadow: 0 2px 10px rgba(10, 101, 204, 0.16);
}
.btn-ai:active {
  transform: translateY(1px);
}
.btn-ai:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.ai-note {
  display: inline-block;
  margin-top: 8px;
  color: #6b7280;
  font: 400 13px/1.4 system-ui;
}

@media (max-width: 680px) {
  .ai-row {
    flex-direction: column;
    align-items: stretch;
  }
  .btn-ai {
    width: 100%;
  }
}

input:focus {
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
  border: 2px solid #0a65cc;
}

input {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #d6dfeb;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: 400 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

textarea {
  width: 100%;
  height: 40px;
  padding: 8px 10px;
  border: 1px solid #d6dfeb;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  font: 400 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

textarea:focus {
  border: 2px solid #0a65cc;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
}

textarea:hover {
  border-color: #0a65cc;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
}

input:hover {
  border-color: #0a65cc;
  box-shadow: 0 0 0 3px rgba(10, 101, 204, 0.12);
  background: #fff;
}
