/**
 * QR 코드 생성기 스타일 (확장)
 * QR Code Generator Styles (Extended)
 */

/* 모드 탭 */
.qr-mode-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.qr-mode-tab {
    padding: 10px 20px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-mode-tab:hover {
    border-color: #d4af37;
    color: #fff;
}

.qr-mode-tab.active {
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    border-color: #d4af37;
    color: #fff;
}

.qr-mode-tab i {
    font-size: 16px;
}

/* 메인 영역 */
.qr-main-area {
    display: flex;
    gap: 24px;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .qr-main-area {
        flex-direction: column;
    }
}

/* 입력 패널 */
.qr-input-panel {
    flex: 1;
    min-width: 0;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
}

.qr-input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qr-input-label {
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-input-label i {
    color: #d4af37;
}

/* 대량 모드 토글 */
.qr-bulk-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #5f5a56;
}

.qr-bulk-toggle input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #d4af37;
    cursor: pointer;
}

/* 입력 필드 */
.qr-input-field {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #2d2a26;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.qr-input-field:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.qr-input-field::placeholder {
    color: #9e9a96;
}

textarea.qr-input-field {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

/* 대량 입력 힌트 */
.qr-bulk-hint {
    margin-top: 8px;
    font-size: 12px;
    color: #5f5a56;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qr-bulk-hint i {
    color: #d4af37;
}

/* WiFi/vCard 폼 */
.qr-form-fields {
    display: none;
    flex-direction: column;
    gap: 12px;
}

.qr-form-fields.show {
    display: flex;
}

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

.qr-form-row > .qr-form-group {
    flex: 1;
}

.qr-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.qr-form-group label {
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
}

.qr-form-group input,
.qr-form-group select {
    padding: 10px 14px;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    color: #2d2a26;
    transition: border-color 0.2s ease;
}

.qr-form-group input:focus,
.qr-form-group select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

@media (max-width: 480px) {
    .qr-form-row {
        flex-direction: column;
    }
}

/* 옵션 영역 */
.qr-options {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e8e4dc;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qr-option-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-option-label {
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    white-space: nowrap;
    min-width: 50px;
}

.qr-size-options {
    display: flex;
    gap: 8px;
}

.qr-size-option {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #5f5a56;
    transition: all 0.2s ease;
}

.qr-size-option:hover {
    border-color: #d4af37;
}

.qr-size-option.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

/* 스타일 옵션 (도트, 눈) */
.qr-style-options {
    display: flex;
    gap: 8px;
}

.qr-dot-style-option,
.qr-eye-style-option {
    width: 40px;
    height: 40px;
    padding: 8px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    color: #5f5a56;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-dot-style-option:hover,
.qr-eye-style-option:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.qr-dot-style-option.active,
.qr-eye-style-option.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.qr-dot-style-option svg,
.qr-eye-style-option svg {
    width: 20px;
    height: 20px;
}

/* 셀렉트 드롭다운 */
.qr-select {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    font-size: 13px;
    color: #5f5a56;
    cursor: pointer;
    transition: border-color 0.2s ease;
    min-width: 140px;
}

.qr-select:hover {
    border-color: #d4af37;
}

.qr-select:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

/* 색상 선택 */
.qr-color-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.qr-color-picker {
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-color-picker label {
    font-size: 12px;
    color: #5f5a56;
}

.qr-color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
    background: #fff;
}

.qr-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.qr-color-picker input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* 로고 업로드 */
.qr-logo-upload {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.qr-logo-btn {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #5f5a56;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.qr-logo-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

.qr-logo-btn.has-logo {
    background: #d4af37;
    border-color: #d4af37;
    color: #fff;
}

.qr-logo-preview {
    width: 36px;
    height: 36px;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    overflow: hidden;
    display: none;
}

.qr-logo-preview.show {
    display: block;
}

.qr-logo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.qr-logo-remove {
    padding: 4px 8px;
    background: transparent;
    border: none;
    color: #dc2626;
    font-size: 12px;
    cursor: pointer;
    display: none;
}

.qr-logo-remove.show {
    display: inline-block;
}

/* 생성 버튼 */
.qr-generate-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #d4af37, #f4d03f);
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.25);
}

.qr-generate-btn:hover {
    background: linear-gradient(135deg, #c4a030, #e4c030);
    transform: translateY(-1px);
}

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

/* 출력 패널 */
.qr-output-panel {
    flex: 1;
    min-width: 0;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.qr-output-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qr-output-label {
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-output-label i {
    color: #d4af37;
}

.qr-output-actions {
    display: flex;
    gap: 8px;
}

.qr-action-btn {
    padding: 8px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #5f5a56;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.qr-action-btn:hover {
    border-color: #d4af37;
    color: #d4af37;
}

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

.qr-action-btn.svg-btn i {
    font-size: 14px;
}

/* QR 코드 미리보기 */
.qr-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    background: #fff;
    border: 1px dashed #e8e4dc;
    border-radius: 8px;
}

.qr-preview-placeholder {
    text-align: center;
    color: #9e9a96;
}

.qr-preview-placeholder i {
    font-size: 48px;
    display: block;
    margin-bottom: 12px;
}

.qr-preview-placeholder span {
    font-size: 14px;
}

.qr-preview canvas,
.qr-preview img {
    max-width: 100%;
    height: auto;
}

/* 대량 생성 결과 */
.qr-bulk-results {
    display: none;
    margin-bottom: 1.5rem;
}

.qr-bulk-results.show {
    display: block;
}

.qr-bulk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.qr-bulk-title {
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-bulk-title i {
    color: #d4af37;
}

.qr-bulk-count {
    background: #d4af37;
    color: #fff;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.qr-bulk-actions {
    display: flex;
    gap: 8px;
}

.qr-bulk-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
}

.qr-bulk-item {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.qr-bulk-item-preview {
    background: #fff;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
}

.qr-bulk-item-preview canvas,
.qr-bulk-item-preview img {
    max-width: 100%;
    height: auto;
}

.qr-bulk-item-text {
    font-size: 12px;
    color: #5f5a56;
    word-break: break-all;
    margin-bottom: 8px;
    max-height: 36px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.qr-bulk-item-download {
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #5f5a56;
    transition: all 0.2s ease;
    width: 100%;
}

.qr-bulk-item-download:hover {
    border-color: #d4af37;
    color: #d4af37;
}

/* 스캐너 섹션 */
.qr-scanner-section {
    display: none;
    margin-bottom: 1.5rem;
}

.qr-scanner-section.show {
    display: block;
}

.qr-scanner-area {
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 12px;
    padding: 24px;
}

.qr-scanner-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.qr-scanner-title {
    font-weight: 600;
    color: #2d2a26;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-scanner-title i {
    color: #d4af37;
}

.qr-scanner-upload {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-scanner-dropzone {
    width: 100%;
    padding: 40px 20px;
    border: 2px dashed #e8e4dc;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
}

.qr-scanner-dropzone:hover {
    border-color: #d4af37;
}

.qr-scanner-dropzone.dragover {
    border-color: #d4af37;
    background: #fefce8;
}

.qr-scanner-dropzone i {
    font-size: 48px;
    color: #d4af37;
    margin-bottom: 12px;
}

.qr-scanner-dropzone p {
    font-size: 14px;
    color: #5f5a56;
    margin: 0 0 8px 0;
}

.qr-scanner-dropzone span {
    font-size: 12px;
    color: #9e9a96;
}

.qr-scanner-preview-area {
    display: none;
    width: 100%;
    gap: 20px;
}

.qr-scanner-preview-area.show {
    display: flex;
    flex-wrap: wrap;
}

.qr-scanner-image {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.qr-scanner-image img {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e8e4dc;
}

.qr-scanner-result {
    flex: 2;
    min-width: 250px;
}

.qr-scanner-result-box {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 16px;
}

.qr-scanner-result-label {
    font-size: 13px;
    font-weight: 500;
    color: #5f5a56;
    margin-bottom: 8px;
}

.qr-scanner-result-text {
    font-size: 14px;
    color: #2d2a26;
    word-break: break-all;
    line-height: 1.6;
}

.qr-scanner-result-text a {
    color: #d4af37;
    text-decoration: none;
}

.qr-scanner-result-text a:hover {
    text-decoration: underline;
}

.qr-scanner-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.qr-scanner-error {
    color: #dc2626;
    font-size: 14px;
}

/* 에러 메시지 */
.qr-error {
    display: none;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    border-radius: 8px;
    color: #dc2626;
    font-size: 14px;
    margin-top: 12px;
}

.qr-error.show {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* 반응형 */
@media (max-width: 480px) {
    .qr-mode-tabs {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-mode-tab {
        justify-content: center;
        padding: 10px 12px;
        font-size: 13px;
    }

    .qr-option-group {
        flex-direction: column;
        align-items: stretch;
    }

    .qr-size-options {
        width: 100%;
    }

    .qr-size-option {
        flex: 1;
        text-align: center;
    }

    .qr-color-options {
        flex-direction: column;
        gap: 12px;
    }

    .qr-style-options {
        width: 100%;
        justify-content: flex-start;
    }

    .qr-select {
        width: 100%;
    }

    .qr-bulk-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .qr-output-actions {
        flex-wrap: wrap;
    }

    .qr-scanner-preview-area {
        flex-direction: column;
    }

    .qr-scanner-image {
        max-width: 100%;
    }
}
