/* =========================
   Pure Custom CSS (Responsive)
   ========================= */

*{box-sizing:border-box}
html,body{height:100%;margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial;}


:root{
  --bg: #f6f7fb;
  --card: #ffffff;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --success: #16a34a;
  --danger: #dc2626;
  --glass: rgba(255,255,255,0.6);

  --radius-lg: 18px;
  --radius-md: 12px;
  --shadow-1: 0 8px 30px rgba(2,6,23,0.06);
}

.printenqr button:hover {
  background: #ffffff;
  color: #000;
}

.printenqr button {
  color: #000;
}

.printenqr button.active {
 color: #fff;
  background: #363636;
}

.printenqr #right-col button {
  background: #363636;
  color: #fff;
  text-align: center;
  display: inline;
}

button#ai-suggest {
  background: #FFBD2F;
  color: #000000;
}

#generateBtn {
  background: #FFBD2F !important;
  color: #000 !important;
  width: 100%;
  margin-top: 6px;
}

.container{max-width:1150px;margin:0 auto}

header{ text-align:center;margin-bottom:20px; }
h1{ font-size:30px;margin:6px 0;color:var(--accent); font-weight:800; letter-spacing:-0.4px; }
p.lead{ color:#475569;margin:0;font-size:14px }

/* Grid */
.grid{ display:grid; gap:18px; }
@media (min-width: 1024px) { .grid{ grid-template-columns: 2fr 1fr; } }
@media (max-width: 1023px) { .grid{ grid-template-columns: 1fr; } }

/* Card */
.card{
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
}

.section-title{
  display:flex;align-items:center;gap:10px;font-weight:700;font-size:16px;margin-bottom:12px;color:#0b1220
}
.section-title svg{flex:0 0 20px;height:20px;width:20px}

.muted{ color:var(--muted); font-size:13px }

/* Inputs */
input[type="url"], input[type="text"], .file-input{
  width:100%; padding:12px 14px; border-radius:var(--radius-md); border:1px solid #e6edf3; background:#fbfdff; font-size:15px; outline:none;
}
input[type="url"]:focus{ box-shadow: 0 8px 30px rgba(37,99,235,0.06); border-color:var(--accent); }

.invalid{ border-color:var(--danger)!important; box-shadow: 0 8px 26px rgba(220,38,38,0.06); }

/* Colors */
.color-row{ display:flex; gap:12px; align-items:flex-end; flex-wrap:wrap; }
.color-picker{
  display:flex; flex-direction:column; align-items:center; gap:6px; padding:8px; border-radius:12px; background:#f8fafc; min-width:84px;
}
.color-picker label{ font-size:12px; color:#475569 }
.color-picker input[type="color"]::-webkit-color-swatch {
  border: none;
  border-radius: 50%;
}
.color-picker input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}
.color-picker input[type="color"] {
  -webkit-appearance: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden !important;
  cursor: pointer;
  border: none !important;
}

/* Buttons */
.btn{ display:inline-flex; align-items:center; gap:8px; padding:10px 14px; border-radius:12px; border:0; cursor:pointer; font-weight:800; font-size:14px; }
.btn-primary{ background:var(--accent); color:#fff; box-shadow: 0 10px 30px rgba(37,99,235,0.12) }
.btn-accent{ background:var(--accent-2); color:#fff }
.btn-neutral{ background:#f3f4f6; color:#0f172a }
.btn:disabled{ opacity:0.55; cursor:not-allowed }

/* selectors */
.selector-grid{ display:grid; gap:10px; grid-template-columns: repeat(2,1fr); }
@media (min-width:640px){ .selector-grid{ grid-template-columns: repeat(4,1fr); } }
.sel-btn{ padding:10px; border-radius:12px; border:1px solid #e6edf3; background:#fff; cursor:pointer; font-weight:700; text-align:center; transition: all .15s ease; font-size:13px; }
.sel-btn.active{ background: #817d7d; color:#fff; box-shadow:0 12px 30px rgba(37,99,235,0.08); transform:translateY(-2px) scale(1.02); }

/* logo preview */
.logo-preview{ display:flex; align-items:center; gap:12px; background:#fbfdff; padding:10px; border-radius:12px; display: none; }
.logo-preview img{ width:44px; height:44px; object-fit:contain; border-radius:8px; border:1px solid #e6edf3; }

/* preview panel */
.preview-wrap{ display:flex; flex-direction:column; gap:12px }
.preview-box{ display:flex; align-items:center; justify-content:center; padding:14px; border-radius:12px; background:#f8fafc; min-height:320px }
/* Keep visible preview default 300x300 on wide screens but allow shrink on narrow */
.preview-canvas{ width:300px; height:300px; max-width:100%; max-height:100%; }
/* center inside preview */
#qrContainer{ width:100%; height:100%; display:flex; align-items:center; justify-content:center; }

.status{ padding:10px; border-radius:10px; background:#dcfce7; color:var(--success); font-weight:700; text-align:center; font-size: 14px; display: none; }

.download-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-top:8px; }

/* dropdown */
.dropdown{ position:relative; margin-top: 12px; }
.dropdown-content{ position:absolute; right:0; top:calc(100% + 10px); background:#fff; border-radius:10px; box-shadow:0 8px 30px rgba(2,6,23,0.08); overflow:hidden; display:none; z-index:40; }
.dropdown.open .dropdown-content{ display:block }
.dropdown-content button{ display:block; padding:10px 16px; width:200px; border:0; background:transparent; text-align:left; cursor:pointer }
.dropdown-content button:hover{ background:#f3f4f6 }

/* small text */
.text-sm{ font-size:13px; color:#475569 }
.muted-sm{ font-size:12px; color:#94a3b8 }

/* spacing helpers */
.mb-2{ margin-bottom:10px; color: #363636; }
.mt-2{ margin-top:10px }

/* responsive tweaks: mobile friendly */
@media (max-width:720px){
  body{ padding:12px }
  h1{ font-size:22px }
  .card{ padding:14px; border-radius:14px }
  .section-title{ font-size:15px; gap:8px }
  .btn{ width:100%; justify-content:center; padding:12px 10px; }
  .download-grid{ grid-template-columns:1fr; }
  .selector-grid{ grid-template-columns:repeat(3,1fr) }
  .color-row{ gap:8px; }
  .preview-box{ padding:12px; min-height:240px }
  .preview-canvas{ width:220px; height:220px }
  .dropdown-content{ left:0; right:auto; width:100% }
}

@media (max-width:420px){
  .preview-canvas{ width:180px; height:180px }
  .selector-grid{ grid-template-columns:repeat(2,1fr) }
}

/* Moved inline styles to CSS */
.border-top-section { border-top:1px solid #eef2ff; padding-top:14px; }
.color-options { display:flex; gap:10px; align-items:flex-end; flex-wrap:wrap; }
.color-mode-wrapper { margin-left:auto; min-width:150px; }
.mode-buttons { display:flex; gap:8px; }
.mode-buttons button { flex:1; }
#ai-suggest svg { margin-right:6px; }
.shape-section { margin-bottom:12px; }
.shape-title { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.shape-section:last-child { margin-bottom:0; }
.logo-upload { display:flex; flex-direction:column; gap:10px; }
.logo-info { flex:1; }
.logo-name { font-weight:700; }
.logo-size { display:flex; align-items:center; gap:8px; margin-top:6px; }
.preview-title { text-align:center; margin:0; }
.download-options { margin-top:12px; }
.download-title { text-align:center; margin:6px 0 10px; }
.download-grid button svg { margin-left:8px; }
#printBtn { width:100%; }
.url-error { display:none; margin-top:8px; color:var(--danger); font-weight:700; }
#logoName { font-weight:700; }
#statusBox { display:none; }
#gradient-end-wrapper { display:none; }
#logoMeta { display:none; }
#printBtn { width:100%; }
.vcardinput input {    width: 100%;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    border: 1px solid #e6edf3;
    background: #fbfdff;
    font-size: 15px;
    outline: none;    margin-bottom: 12px;}

    .preview-title {
    text-align: center;
    margin: 0;
    font-size: 24px;
    color: #363636;
    font-weight: 600;
}



.download-title {
    text-align: center;
    margin: 6px 0 10px;
    display: block;
    color: #363636;
    font-weight: 700;
}