.qr-type-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.qr-type-button {
    min-height: 74px;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease,
        transform 0.2s ease;
}

.qr-type-button:hover {
    transform: translateY(-1px);
    border-color: var(--primary);
    color: var(--primary);
}

.qr-type-button.active {
    border-color: var(--primary);
    background: #eef2ff;
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 86, 232, 0.08);
}

.qr-type-button span {
    min-height: 22px;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 800;
}

.content-title {
    margin-top: 34px;
}

.dynamic-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.dynamic-fields .field-wide {
    grid-column: 1 / -1;
}

.dynamic-fields input,
.dynamic-fields textarea,
.dynamic-fields select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--text);
    outline: none;
}

.dynamic-fields input,
.dynamic-fields select {
    min-height: 46px;
    padding: 0 13px;
}

.dynamic-fields textarea {
    min-height: 115px;
    padding: 13px;
    resize: vertical;
    line-height: 1.5;
}

.dynamic-fields input:focus,
.dynamic-fields textarea:focus,
.dynamic-fields select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(39, 86, 232, 0.1);
}

.field-helper {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.4;
}

.checkbox-control {
    min-height: 46px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 13px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
}

.checkbox-control input {
    width: auto;
    min-height: auto;
}

.selected-type-summary {
    margin-bottom: 17px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-radius: 13px;
    background: #f8fafc;
}

.selected-type-summary span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.selected-type-summary strong {
    color: var(--primary);
    font-size: 13px;
}

@media (max-width: 900px) {
    .qr-type-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .qr-type-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dynamic-fields {
        grid-template-columns: 1fr;
    }

    .dynamic-fields .field-wide {
        grid-column: auto;
    }
}

/* ==========================================
   LOGOTIPO Y PERSONALIZACIÓN DEL DISEÑO
   ========================================== */

.design-title {
    margin-top: 34px;
}

.logo-editor {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 20px;
    align-items: center;
}

.logo-upload-box {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.logo-upload-box input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.logo-upload-button,
.secondary-small-button {
    min-height: 43px;
    padding: 0 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.logo-upload-button {
    background: var(--primary);
    color: #ffffff;
}

.secondary-small-button {
    border: 1px solid var(--border);
    background: #ffffff;
    color: var(--text);
}

.secondary-small-button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.logo-preview-container {
    height: 130px;
    padding: 12px;
    display: grid;
    place-items: center;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.logo-preview-container span {
    color: var(--muted);
    font-size: 12px;
}

.logo-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-options {
    margin-top: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.design-checkbox {
    grid-column: 1 / -1;
    min-height: 48px;
    padding: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--muted);
    font-size: 13px;
}

.design-checkbox input {
    width: 18px;
    height: 18px;
}

#logo-size {
    width: 100%;
    accent-color: var(--primary);
}

.style-section {
    margin-top: 23px;
}

.style-section h3 {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.style-option-grid {
    display: grid;
    gap: 10px;
}

.body-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.eye-options {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.style-option {
    position: relative;
}

.style-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.style-option > span {
    min-height: 86px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        color 0.2s ease;
}

.style-option input:checked + span {
    border-color: var(--primary);
    background: #eef2ff;
    color: var(--primary);
    box-shadow: 0 0 0 3px rgba(39, 86, 232, 0.08);
}

.style-option b {
    width: 34px;
    height: 34px;
    display: block;
    position: relative;
    background: #111827;
}

.shape-rounded,
.pupil-rounded {
    border-radius: 10px;
}

.shape-dots {
    border-radius: 50%;
    box-shadow:
        19px 0 0 -7px #111827,
        0 19px 0 -7px #111827,
        19px 19px 0 -7px #111827;
    transform: scale(0.55);
}

.shape-diamond,
.pupil-diamond {
    transform: rotate(45deg) scale(0.72);
}

.shape-gapped {
    transform: scale(0.72);
}

.shape-vertical {
    width: 17px !important;
    border-radius: 8px;
}

.shape-horizontal {
    height: 17px !important;
    border-radius: 8px;
}

.shape-leaf {
    border-radius: 18px 4px 18px 4px;
}

.eye-frame-square,
.eye-frame-rounded {
    background: transparent !important;
    border: 5px solid #111827;
}

.eye-frame-rounded {
    border-radius: 10px;
}

.pupil-circle {
    border-radius: 50%;
}

@media (max-width: 680px) {
    .logo-editor,
    .logo-options {
        grid-template-columns: 1fr;
    }

    .design-checkbox {
        grid-column: auto;
    }

    .logo-preview-container {
        width: 100%;
    }

    .body-options,
    .eye-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================================
   AI2GO QR — ESTILOS ADICIONALES
   ========================================================= */

.body-options,
.eye-options {
    grid-template-columns:
        repeat(auto-fill, minmax(92px, 1fr));
}

.extra-style-option > span {
    position: relative;
}

.extra-style-option em {
    font-style: normal;
}

.style-risk-badge {
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.creative-style-warning {
    margin-top: 13px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface-2);
}

.creative-style-warning strong {
    color: var(--text);
    font-size: 12px;
}

.creative-style-warning span {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}


/* CUERPO */

.preview-body-circle {
    border-radius: 50%;
}

.preview-body-squircle {
    border-radius: 42%;
}

.preview-body-octagon,
.preview-pupil-octagon {
    clip-path: polygon(
        30% 0,
        70% 0,
        100% 30%,
        100% 70%,
        70% 100%,
        30% 100%,
        0 70%,
        0 30%
    );
}

.preview-body-hexagon {
    clip-path: polygon(
        25% 0,
        75% 0,
        100% 50%,
        75% 100%,
        25% 100%,
        0 50%
    );
}

.preview-body-star,
.preview-pupil-star {
    clip-path: polygon(
        50% 0,
        61% 35%,
        98% 35%,
        68% 57%,
        79% 94%,
        50% 72%,
        21% 94%,
        32% 57%,
        2% 35%,
        39% 35%
    );
}

.preview-body-cross,
.preview-pupil-cross {
    clip-path: polygon(
        35% 0,
        65% 0,
        65% 35%,
        100% 35%,
        100% 65%,
        65% 65%,
        65% 100%,
        35% 100%,
        35% 65%,
        0 65%,
        0 35%,
        35% 35%
    );
}

.preview-body-x,
.preview-pupil-x {
    clip-path: polygon(
        15% 0,
        50% 35%,
        85% 0,
        100% 15%,
        65% 50%,
        100% 85%,
        85% 100%,
        50% 65%,
        15% 100%,
        0 85%,
        35% 50%,
        0 15%
    );
}

.preview-body-tiny {
    width: 18px !important;
    height: 18px !important;
    border-radius: 4px;
}

.preview-body-capsule-h {
    height: 18px !important;
    border-radius: 999px;
}

.preview-body-capsule-v {
    width: 18px !important;
    border-radius: 999px;
}

.preview-body-triangle {
    clip-path: polygon(
        50% 0,
        100% 100%,
        0 100%
    );
}

.preview-body-sparkle {
    clip-path: polygon(
        50% 0,
        61% 39%,
        100% 50%,
        61% 61%,
        50% 100%,
        39% 61%,
        0 50%,
        39% 39%
    );
}


/* MARCOS */

.preview-frame-circle,
.preview-frame-leaf,
.preview-frame-bevel,
.preview-frame-diamond,
.preview-frame-soft {
    background: transparent !important;
    border: 5px solid var(--text-strong);
}

.preview-frame-circle {
    border-radius: 50%;
}

.preview-frame-leaf {
    border-radius: 2px 18px 2px 18px;
}

.preview-frame-bevel {
    clip-path: polygon(
        25% 0,
        75% 0,
        100% 25%,
        100% 75%,
        75% 100%,
        25% 100%,
        0 75%,
        0 25%
    );
}

.preview-frame-diamond {
    transform: rotate(45deg) scale(0.72);
}

.preview-frame-soft {
    border-radius: 13px;
}


/* CENTRO DEL OJO */

.preview-pupil-leaf {
    border-radius: 2px 18px 2px 18px;
}

.preview-pupil-horizontal {
    height: 17px !important;
    border-radius: 999px;
}

.preview-pupil-vertical {
    width: 17px !important;
    border-radius: 999px;
}

.preview-pupil-clover {
    width: 17px !important;
    height: 17px !important;
    border-radius: 50%;
    box-shadow:
        17px 0 0 var(--text-strong),
        0 17px 0 var(--text-strong),
        17px 17px 0 var(--text-strong);
    transform: translate(-8px, -8px);
}

.preview-pupil-bars-h {
    width: 35px !important;
    height: 7px !important;
    border-radius: 999px;
    box-shadow:
        0 12px 0 var(--text-strong),
        0 24px 0 var(--text-strong);
    transform: translateY(-12px);
}

.preview-pupil-bars-v {
    width: 7px !important;
    height: 35px !important;
    border-radius: 999px;
    box-shadow:
        12px 0 0 var(--text-strong),
        24px 0 0 var(--text-strong);
    transform: translateX(-12px);
}

@media (max-width: 600px) {
    .body-options,
    .eye-options {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 420px) {
    .body-options,
    .eye-options {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}
