/* 영수증 생성기 스타일 */

.generator-section {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 30px;
    margin-bottom: 50px;
}

/* 입력 섹션 */
.input-section {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* 폼 요소 */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(45, 45, 45, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

/* 품목 섹션 */
.items-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.items-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.items-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.item-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr 1.5fr auto;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
}

.item-row .form-control {
    margin-bottom: 0;
}

.item-total {
    text-align: right;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.btn-remove {
    width: 30px;
    height: 30px;
    border: none;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 1;
    transition: all 0.3s ease;
}

.btn-remove:hover {
    background: #c82333;
}

/* 결제 섹션 */
.payment-section,
.style-section {
    margin: 25px 0;
    padding: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.payment-section h4,
.style-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

/* 스타일 옵션 */
.style-options {
    display: flex;
    gap: 15px;
}

.style-option {
    flex: 1;
    cursor: pointer;
}

.style-option input {
    display: none;
}

.style-preview {
    display: block;
    padding: 15px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-weight: 500;
    transition: all 0.3s ease;
}

.style-option input:checked + .style-preview {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.style-preview.classic {
    font-family: 'Courier New', monospace;
}

.style-preview.modern {
    font-family: 'Arial', sans-serif;
}

.style-preview.minimal {
    font-family: 'Georgia', serif;
}

/* 버튼 */
.btn-block {
    width: 100%;
    margin-top: 20px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

/* 미리보기 섹션 */
.preview-section {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.preview-container {
    background: #1a1a1a;
    padding: 30px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* 영수증 스타일 */
.receipt {
    width: 300px;
    padding: 20px;
    background: white;
    font-size: 12px;
    line-height: 1.4;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

/* 클래식 스타일 */
.receipt.classic {
    font-family: 'Courier New', monospace;
    background: #fffef5;
    border: 1px dashed #ccc;
}

.receipt.classic .receipt-header {
    text-align: center;
    padding-bottom: 10px;
}

.receipt.classic .store-name {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.receipt.classic .store-info {
    font-size: 10px;
    color: #666;
}

.receipt.classic .receipt-divider {
    text-align: center;
    color: #999;
    margin: 10px 0;
    font-size: 10px;
    letter-spacing: -1px;
}

.receipt.classic .receipt-info p,
.receipt.classic .receipt-total p,
.receipt.classic .receipt-payment p {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
}

.receipt.classic .items-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    font-weight: bold;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 5px;
    margin-bottom: 5px;
}

.receipt.classic .item-line {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    padding: 3px 0;
}

.receipt.classic .item-line .amount {
    text-align: right;
}

.receipt.classic .grand-total {
    font-size: 14px;
    font-weight: bold;
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #333;
}

.receipt.classic .receipt-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 10px;
}

.receipt.classic .receipt-barcode {
    font-size: 20px;
    letter-spacing: 2px;
    margin-top: 10px;
}

/* 모던 스타일 */
.receipt.modern {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px;
}

.receipt.modern .receipt-header {
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
}

.receipt.modern .store-name {
    font-size: 22px;
    font-weight: bold;
    margin-bottom: 5px;
}

.receipt.modern .store-info {
    font-size: 11px;
    opacity: 0.8;
}

.receipt.modern .receipt-divider {
    display: none;
}

.receipt.modern .receipt-info {
    padding: 15px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.receipt.modern .receipt-info p,
.receipt.modern .receipt-total p,
.receipt.modern .receipt-payment p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.receipt.modern .items-header-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    font-weight: bold;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 11px;
    text-transform: uppercase;
}

.receipt.modern .item-line {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.receipt.modern .item-line .amount {
    text-align: right;
}

.receipt.modern .receipt-total {
    padding: 15px 0;
}

.receipt.modern .grand-total {
    font-size: 18px;
    font-weight: bold;
    background: rgba(255,255,255,0.2);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.receipt.modern .receipt-footer {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.receipt.modern .receipt-barcode {
    display: none;
}

/* 미니멀 스타일 */
.receipt.minimal {
    font-family: 'Georgia', serif;
    background: white;
    border: 2px solid #333;
}

.receipt.minimal .receipt-header {
    text-align: center;
    padding-bottom: 15px;
}

.receipt.minimal .store-name {
    font-size: 24px;
    font-weight: normal;
    font-style: italic;
    margin-bottom: 5px;
}

.receipt.minimal .store-info {
    font-size: 10px;
    color: #666;
}

.receipt.minimal .receipt-divider {
    border-top: 1px solid #333;
    margin: 15px 0;
    height: 0;
    overflow: hidden;
}

.receipt.minimal .receipt-info p,
.receipt.minimal .receipt-total p,
.receipt.minimal .receipt-payment p {
    display: flex;
    justify-content: space-between;
    margin: 5px 0;
}

.receipt.minimal .items-header-row {
    display: none;
}

.receipt.minimal .item-line {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
}

.receipt.minimal .item-line .name {
    flex: 2;
}

.receipt.minimal .item-line .qty {
    flex: 1;
    text-align: center;
    color: #666;
}

.receipt.minimal .item-line .qty::before {
    content: '×';
    margin-right: 3px;
}

.receipt.minimal .item-line .amount {
    flex: 1;
    text-align: right;
}

.receipt.minimal .grand-total {
    font-size: 16px;
    font-weight: bold;
    margin-top: 10px;
}

.receipt.minimal .receipt-footer {
    text-align: center;
    margin-top: 20px;
    font-style: italic;
}

.receipt.minimal .receipt-barcode {
    display: none;
}

/* 공통 메모 스타일 */
.receipt-memo {
    margin-top: 10px;
    padding: 10px;
    background: rgba(0,0,0,0.05);
    border-radius: 5px;
    font-size: 11px;
}

.receipt.modern .receipt-memo {
    background: rgba(255,255,255,0.1);
}

/* 다운로드 섹션 */
.download-section {
    display: flex;
    gap: 10px;
}

.download-section .btn {
    flex: 1;
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
}

/* 정보 섹션 */
.info-section {
    margin-top: 50px;
    padding-top: 50px;
    border-top: 2px solid var(--border-color);
}

.info-section h2 {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 30px;
    text-align: center;
}

.info-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
}

.info-card.warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.info-card.warning h3 {
    color: #856404;
}

.info-card.warning p {
    color: #856404;
}

.info-card h3 {
    font-size: 1.3rem;
    color: #2d2d2d;
    margin-bottom: 15px;
}

.info-card p,
.info-card li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 10px;
}

.info-card ul,
.info-card ol {
    margin-left: 20px;
}

.info-card li {
    margin-bottom: 8px;
}

/* 반응형 */
@media (max-width: 1024px) {
    .generator-section {
        grid-template-columns: 1fr;
    }

    .preview-section {
        order: -1;
    }
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .item-row {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .item-row .item-name {
        grid-column: span 2;
    }

    .item-total {
        text-align: left;
    }

    .style-options {
        flex-direction: column;
    }

    .download-section {
        flex-direction: column;
    }

    .preview-container {
        padding: 15px;
    }

    .receipt {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .input-section,
    .preview-section {
        padding: 15px;
    }

    .items-section,
    .payment-section,
    .style-section {
        padding: 15px;
    }
}

