/* ============================================================
   QRCode Free — Custom Styles
   ============================================================ */

*, *::before, *::after {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: #f0f2f5;
    color: #1e293b;
}

/* ── HEADER ─────────────────────────────────────────────────── */
.site-header {
    background: linear-gradient(135deg, #3730a3 0%, #6d28d9 100%);
    box-shadow: 0 2px 16px rgba(55, 48, 163, 0.25);
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

/* ── TYPE SELECTOR BAR ───────────────────────────────────────── */
.type-bar {
    background: #fff;
    border-radius: 16px;
    padding: 10px 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}

.type-bar-inner {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* ── TYPE BUTTONS ────────────────────────────────────────────── */
.btn-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 6px;
    min-width: 62px;
    min-height: 58px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    cursor: pointer;
    transition: all 0.15s ease;
    appearance: none;
    -webkit-appearance: none;
    flex: 1 1 62px;
    max-width: 90px;
}

.btn-type i {
    font-size: 18px;
    line-height: 1;
}

.btn-type span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

.btn-type:hover {
    border-color: #6d28d9;
    color: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(109,40,217,0.15);
}

.btn-type.active {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 14px rgba(79,70,229,0.35);
}

.btn-type:active { transform: translateY(0); }

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
    border-radius: 16px;
    overflow: hidden;
}

.card-header-custom {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    background: #fff;
    border-bottom: 1px solid #f1f5f9;
    font-size: 13px;
}

/* ── STICKY PREVIEW (right column) ──────────────────────────── */
.preview-sticky {
    position: sticky;
    top: 12px;
}

/* ── QR FORMS ────────────────────────────────────────────────── */
.qr-form {
    animation: fadeSlideIn 0.2s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── GENERATE BUTTON ─────────────────────────────────────────── */
#btn-generate {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 20px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(79,70,229,0.3);
}

#btn-generate:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(79,70,229,0.4);
}

#btn-generate:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(79,70,229,0.3);
}

/* ── QR STYLE PICKER ─────────────────────────────────────────── */
.qr-style-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.btn-qr-style {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 10px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    color: #475569;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1 1 70px;
    max-width: 85px;
}

.btn-qr-style svg {
    display: block;
    color: #475569;
    transition: color 0.15s;
}

.btn-qr-style span {
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
}

.btn-qr-style:hover {
    border-color: #6d28d9;
    background: #f3f0ff;
    color: #6d28d9;
}

.btn-qr-style:hover svg { color: #6d28d9; }

.btn-qr-style.active {
    border-color: #6d28d9;
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    color: #fff;
    box-shadow: 0 3px 10px rgba(79,70,229,0.35);
}

.btn-qr-style.active svg { color: #fff; }

/* ── COLOR PICKERS ───────────────────────────────────────────── */
.form-control-color {
    height: 40px;
    cursor: pointer;
    border-radius: 8px;
    border-color: #e2e8f0;
    padding: 3px 5px;
}

.form-control-color:hover { border-color: #6d28d9; }

/* ── RANGE SLIDER ────────────────────────────────────────────── */
.form-range::-webkit-slider-thumb { background: #6d28d9; }
.form-range::-moz-range-thumb { background: #6d28d9; border: none; }
.form-range:focus::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(109,40,217,0.25); }

/* ── QR PREVIEW ──────────────────────────────────────────────── */
.qr-image-preview {
    max-width: 100%;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 6px;
    background: #fff;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: box-shadow 0.2s;
}

.qr-image-preview:hover { box-shadow: 0 8px 30px rgba(0,0,0,0.12); }

/* ── CONTENT BOX ─────────────────────────────────────────────── */
.qr-content-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px;
}

/* ── DOWNLOAD BUTTONS ────────────────────────────────────────── */
#btn-download-png {
    background: linear-gradient(135deg, #4f46e5, #7c3aed);
    border: none;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.15s;
}

#btn-download-png:hover {
    background: linear-gradient(135deg, #4338ca, #6d28d9);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}

#btn-download-svg {
    border-radius: 8px;
    font-weight: 700;
    border-color: #6d28d9;
    color: #6d28d9;
    transition: all 0.15s;
}

#btn-download-svg:hover {
    background: #6d28d9;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(109,40,217,0.3);
}

/* ── LOGO DROP ZONE ──────────────────────────────────────────── */
.logo-drop-zone {
    border: 2px dashed #c4b5fd;
    border-radius: 12px;
    background: #faf5ff;
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 90px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-drop-zone:hover,
.logo-drop-zone.dragover {
    border-color: #7c3aed;
    background: #f3e8ff;
    box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

.logo-drop-zone .logo-drop-thumb {
    max-height: 64px;
    max-width: 120px;
    border-radius: 10px;
    border: 2px solid #e2e8f0;
    padding: 3px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.10);
}

/* ── LOGO PRESETS GRID ───────────────────────────────────────── */
.logo-presets-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.btn-logo-preset {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 9px;
    padding: 5px 5px 4px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex: 1 1 50px;
    max-width: 62px;
}

.btn-logo-preset img {
    width: 32px;
    height: 32px;
    border-radius: 7px;
    display: block;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.btn-logo-preset span {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    line-height: 1;
    text-align: center;
}

.btn-logo-preset:hover {
    border-color: #7c3aed;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(109,40,217,0.18);
}

.btn-logo-preset.active {
    border-color: #7c3aed;
    background: #f3e8ff;
    box-shadow: 0 0 0 2px rgba(124,58,237,0.25);
}

.btn-logo-preset.active span { color: #7c3aed; }

/* ── BANNERS DE ANÚNCIO ──────────────────────────────────────── */
.ad-slot {
    position: relative;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    overflow: hidden;
}

.ad-slot--leaderboard { min-height: 66px; }
.ad-slot--sidebar     { min-height: 120px; }
.ad-slot--bottom      { min-height: 80px; }

.ad-label {
    position: absolute;
    top: 5px;
    right: 8px;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
}

.ad-placeholder-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 16px;
    color: #64748b;
    min-height: inherit;
}

/* ── SERVIÇOS SUGERIDOS ──────────────────────────────────────── */
.services-section { }

.services-title {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
    letter-spacing: -0.01em;
}

.ad-badge {
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 1px 5px;
}

.service-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    position: relative;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.service-card-icon {
    padding: 18px 16px 14px;
    font-size: 26px;
    color: #fff;
    line-height: 1;
}

.service-card-body {
    padding: 12px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.service-card-body h6 {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1e293b;
}

.service-card-body p {
    font-size: 12px;
    color: #64748b;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 10px;
}

.btn-service {
    font-size: 11px;
    font-weight: 700;
    color: #6d28d9;
    text-decoration: none;
    transition: gap 0.15s;
}

.btn-service:hover { color: #4f46e5; text-decoration: underline; }

.service-patrocinado {
    position: absolute;
    top: 6px;
    right: 8px;
    font-size: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: rgba(255,255,255,0.7);
}

/* ── FOOTER ──────────────────────────────────────────────────── */
.footer-dark { background: #1e1b4b; }
.footer-link:hover { color: #fff !important; }

/* ── TOAST ───────────────────────────────────────────────────── */
#toast-msg {
    min-width: 200px;
    border-radius: 10px;
    font-size: 13px;
}

/* ── FORM CONTROLS ───────────────────────────────────────────── */
.form-control:focus,
.form-select:focus {
    border-color: #6d28d9;
    box-shadow: 0 0 0 0.2rem rgba(109,40,217,0.15);
}

.form-check-input:checked {
    background-color: #6d28d9;
    border-color: #6d28d9;
}

.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(109,40,217,0.15);
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: #6d28d9;
}

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 576px) {
    .btn-type {
        min-height: 52px;
        min-width: 54px;
        padding: 7px 4px;
    }
    .btn-type i { font-size: 16px; }
    .btn-type span { font-size: 9px; }
    .type-bar { padding: 8px 10px; }

    .service-card-icon { padding: 14px 14px 10px; font-size: 22px; }
    .service-card-body { padding: 10px 14px 14px; }
}

@media (max-width: 991px) {
    .preview-sticky { position: static; }
    .ad-slot--sidebar { min-height: 80px; }
}
