/* BOS-QR */

.qr-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
    gap: 20px;
    align-items: start;
}

.qr-builder,
.qr-preview-panel {
    padding: 30px;
}

.qr-type-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 24px;
}

.qr-type {
    appearance: none;
    min-height: 44px;
    padding: 0 12px;
    border: 1px solid #243b4d;
    border-radius: 9px;
    background: rgba(7, 15, 24, 0.9);
    color: #aebfca;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, color 150ms ease;
}

.qr-type:hover {
    border-color: #2c7187;
    background: rgba(11, 26, 38, 0.95);
    transform: translateY(-1px);
}

.qr-type.active {
    border-color: var(--green);
    background: rgba(140, 255, 102, 0.07);
    color: var(--green);
}

.qr-fields[hidden] {
    display: none;
}

.qr-fields .fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.qr-fields .field-full {
    grid-column: 1 / -1;
}

.qr-fields textarea {
    width: 100%;
    min-height: 110px;
    padding: 10px 12px;
    border: 1px solid #213a4c;
    border-radius: 9px;
    outline: none;
    background: #050b11;
    color: #edf7fb;
    font: inherit;
    line-height: 1.6;
    resize: vertical;
    box-sizing: border-box;
}

.qr-fields textarea::placeholder {
    color: #60798c;
}

.qr-fields textarea:focus {
    border-color: #1b9abb;
    box-shadow: 0 0 0 3px rgba(24, 217, 255, 0.07);
}

.qr-note {
    margin: 20px 0 0;
    padding: 12px 14px;
    border-left: 2px solid var(--green);
    opacity: .75;
    font-size: 13px;
    line-height: 1.7;
}

.qr-preview-panel {
    position: sticky;
    top: 24px;
}

.qr-preview {
    min-height: 330px;
    display: grid;
    place-items: center;
    padding: 24px;
    border: 1px dashed rgba(255,255,255,.14);
    border-radius: 14px;
    background: rgba(0,0,0,.12);
}

.qr-placeholder {
    text-align: center;
    color: #71899c;
}

.qr-placeholder span {
    display: inline-grid;
    place-items: center;
    width: 74px;
    height: 74px;
    margin-bottom: 14px;
    border: 1px solid #24506a;
    border-radius: 12px;
    color: var(--cyan);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: .08em;
}

.qr-placeholder p {
    max-width: 230px;
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
}

.qr-placeholder strong {
    color: #a9bdca;
}

#qrCode {
    display: grid;
    place-items: center;
    min-width: 256px;
    min-height: 256px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
}

#qrCode img,
#qrCode canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

.qr-result {
    margin-top: 20px;
}

.qr-result[hidden] {
    display: none;
}

.qr-result-info {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.qr-result-info span {
    color: #8da5b5;
    font-size: 12px;
}

.qr-result-info strong {
    color: #edf6fa;
    font-size: 12px;
}

.character-count {
    display: block;
    margin-top: 6px;
    color: #71899c;
    font-size: 11px;
    text-align: right;
}

@media (max-width: 900px) {
    .qr-workspace {
        grid-template-columns: 1fr;
    }

    .qr-preview-panel {
        position: static;
    }

}

@media (max-width: 700px) {
    .qr-builder,
    .qr-preview-panel {
        padding: 22px;
    }

    .qr-type-tabs {
        grid-template-columns: 1fr 1fr;
    }

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

    .qr-fields .field-full {
        grid-column: auto;
    }

    .qr-preview {
        min-height: 290px;
        padding: 18px;
    }

    #qrCode {
        min-width: 220px;
        min-height: 220px;
    }
}
