/* public/css/qrcode.css */

.qr-app {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.editor-side {
    flex: 1;
    min-width: 320px;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.preview-side {
    flex: 1;
    min-width: 320px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.section-label {
    font-size: 1rem;
    color: #2a5298;
    border-left: 4px solid #2a5298;
    padding-left: 10px;
    margin-bottom: 15px;
}

.section-label-gap {
    margin-top: 25px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #444;
    font-size: 0.95rem;
}

.form-group input[type="url"],
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #fff;
    box-sizing: border-box;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-group.half {
    flex: 1;
}

.form-group input[type="color"] {
    width: 100%;
    height: 40px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    padding: 2px;
}

/* 拡大・縮小コントロール */
.size-adjuster {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 12px;
}

.btn-size-ctrl {
    background: #fff;
    border: 1px solid #cbd5e1;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    color: #334155;
}

.btn-size-ctrl:hover {
    background: #f1f5f9;
}

#display-size-px {
    font-weight: bold;
    color: #1e293b;
}

/* プレビュー側カード */
.qr-preview-card {
    background: #fff;
    width: 100%;
    max-width: 380px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.qr-canvas-wrapper {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

#qr-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.qr-info-meta {
    width: 100%;
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.info-item {
    display: flex;
    justify-content: space-between;
}

.info-label {
    color: #64748b;
}

.info-val {
    font-weight: bold;
    color: #334155;
}

.btn-download {
    width: 100%;
    background-color: #2a5298;
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(42,82,152,0.3);
    transition: background-color 0.2s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-download:hover {
    background-color: #1e3c72;
}

.btn-download:active {
    transform: scale(0.98);
}

@media (max-width: 768px) {
    .qr-app {
        gap: 20px;
    }
    .editor-side, .preview-side {
        flex: 1 1 100%;
        min-width: 0;
    }
}
/* ===== アレンジ（折りたたみの中） ===== */
/* 💡 追加：プルダウン1つだったアレンジを、重ねて使えるチェックボックスに変えたぶんの見た目です */
.badge-group {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.badge-group[hidden] { display: none; }

.badge-group .input-note {
    font-size: 0.8rem;
    color: #64748b;
    margin-top: 4px;
    line-height: 1.6;
}

.badge-group input[type="file"] {
    width: 100%;
    font-size: 0.85rem;
}

.btn-badge-clear {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 0.8rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
    cursor: pointer;
}

.btn-badge-clear:hover { background: #e2e8f0; }
.btn-badge-clear[hidden] { display: none; }

.badge-warning {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    font-size: 0.82rem;
    color: #9a3412;
    line-height: 1.6;
}

/* 画像が小さすぎるときのお知らせ */
.qr-size-warning {
    margin: 10px 0 0;
    padding: 8px 10px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #9a3412;
    line-height: 1.6;
}
.qr-size-warning[hidden] { display: none; }

/* 読み取れない設定のときは、赤系にして「止まっている」ことを分かるようにします */
.qr-size-warning.is-blocking {
    background: #fef2f2;
    border-color: #fecaca;
    color: #b91c1c;
}

/* これ以上小さく／大きくできないときのボタン */
.btn-size-ctrl:disabled {
    opacity: 0.45;
    cursor: default;
}

.btn-download:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
