/**
 * v7/company/qr-code.css - QR 코드 관련 페이지 공용 CSS
 *
 * QR 코드 발행, 스캔 결과, 재방문 포인트, 후기 작성 페이지에서 공유.
 * Web Awesome Pro 기반, Bootstrap 미사용.
 */

/* ── 공통 페이지 래퍼 ── */
.qr-page {
    max-width: 480px;
    margin: 0 auto;
    padding: 1rem 0.75rem 2rem;
}

/* ── 업소 정보 카드 ── */
.qr-company-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 10px;
    background: #f8fafc;
    margin-bottom: 1.25rem;
}
.qr-company-logo {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    object-fit: cover;
    flex-shrink: 0;
    background: #e2e8f0;
}
.qr-company-logo-placeholder {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #94a3b8;
    font-size: 1.3rem;
}
.qr-company-info {
    flex: 1;
    min-width: 0;
}
.qr-company-name {
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.2rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qr-company-meta {
    font-size: 0.78rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.qr-company-meta i {
    margin-right: 0.2rem;
}

/* ── QR 코드 표시 영역 ── */
.qr-display-area {
    text-align: center;
    padding: 1.5rem 1rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}
.qr-display-area h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 1rem;
}
.qr-code-container {
    display: inline-block;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}
.qr-timer {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: #64748b;
}
.qr-timer strong {
    color: #dc2626;
    font-size: 1.1rem;
}
.qr-stats {
    margin-top: 0.75rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

/* ── 결과 상태 카드 ── */
.qr-result-card {
    text-align: center;
    padding: 2rem 1.25rem;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-bottom: 1.25rem;
}
.qr-result-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 1rem;
}
.qr-result-icon.success {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: qr-pulse 2s ease-in-out infinite;
}
.qr-result-icon.warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}
.qr-result-icon.error {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}
.qr-result-icon.gift {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    animation: qr-confetti-drop 1s ease-out;
}
.qr-result-icon.star {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

@keyframes qr-pulse {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
}
@keyframes qr-confetti-drop {
    0% { transform: scale(0.3) rotate(-10deg); opacity: 0; }
    60% { transform: scale(1.15) rotate(3deg); opacity: 1; }
    100% { transform: scale(1) rotate(0); opacity: 1; }
}

.qr-result-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.4rem;
}
.qr-result-message {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0 0 1rem;
    line-height: 1.5;
}

/* ── 포인트 표시 박스 ── */
.qr-point-box {
    display: inline-block;
    padding: 0.6rem 1.5rem;
    border-radius: 30px;
    font-size: 1.3rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 1rem;
}
.qr-point-box.blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.qr-point-box.orange {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
}
.qr-point-box.green {
    background: linear-gradient(135deg, #10b981, #059669);
}
.qr-point-box.purple {
    background: linear-gradient(135deg, #8b5cf6, #6d28d9);
}

/* ── 포인트 변동 테이블 ── */
.qr-point-table {
    width: 100%;
    max-width: 280px;
    margin: 0.75rem auto 0;
    font-size: 0.82rem;
    color: #475569;
}
.qr-point-table td {
    padding: 0.3rem 0.5rem;
}
.qr-point-table td:first-child {
    text-align: right;
    color: #94a3b8;
    width: 50%;
}
.qr-point-table td:last-child {
    text-align: left;
    font-weight: 600;
}

/* ── CTA 버튼 ── */
.qr-cta-area {
    margin-top: 1.25rem;
}
.qr-cta-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    border: none;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-bottom: 0.75rem;
}
.qr-cta-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.qr-cta-btn:active {
    transform: translateY(0);
}
.qr-cta-btn.revisit {
    background: linear-gradient(135deg, #f59e0b, #ea580c);
    animation: qr-cta-glow-orange 2s ease-in-out infinite;
}
.qr-cta-btn.review {
    background: linear-gradient(135deg, #10b981, #059669);
    animation: qr-cta-glow-green 2s ease-in-out infinite;
}
.qr-cta-btn.primary {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}
.qr-cta-btn.secondary {
    background: #f1f5f9;
    color: #475569;
}
.qr-cta-btn.secondary:hover {
    background: #e2e8f0;
}
.qr-cta-btn-sub {
    display: block;
    font-size: 0.78rem;
    font-weight: 400;
    opacity: 0.9;
    margin-top: 0.2rem;
}

@keyframes qr-cta-glow-orange {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(245, 158, 11, 0); }
}
@keyframes qr-cta-glow-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ── 에러 메시지 ── */
.qr-error-box {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    font-size: 0.88rem;
    margin-bottom: 1.25rem;
    line-height: 1.5;
}
.qr-error-box i {
    margin-right: 0.3rem;
}

/* ── 24시간 중복 안내 ── */
.qr-duplicate-card {
    text-align: center;
    padding: 2rem 1.25rem;
    background: #fffbeb;
    border-radius: 12px;
    border: 1px solid #fde68a;
    margin-bottom: 1.25rem;
}
.qr-duplicate-icon {
    font-size: 2.5rem;
    color: #d97706;
    margin-bottom: 0.75rem;
}
.qr-duplicate-title {
    font-size: 1rem;
    font-weight: 700;
    color: #92400e;
    margin: 0 0 0.5rem;
}
.qr-duplicate-time {
    font-size: 0.85rem;
    color: #b45309;
    margin: 0;
}

/* ── 후기 작성 폼 ── */
.qr-review-banner {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    color: #065f46;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 1.25rem;
}
.qr-review-banner i {
    margin-right: 0.3rem;
}

/* 사진 업로드 그리드 */
.qr-photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.qr-photo-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.qr-photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.qr-photo-delete {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.qr-photo-add {
    aspect-ratio: 1;
    border-radius: 8px;
    border: 2px dashed #cbd5e1;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: border-color 0.2s;
    color: #94a3b8;
    font-size: 0.75rem;
    gap: 0.3rem;
}
.qr-photo-add:hover {
    border-color: #3b82f6;
    color: #3b82f6;
}
.qr-photo-add i {
    font-size: 1.2rem;
}
.qr-photo-uploading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 텍스트 입력 */
.qr-review-textarea {
    width: 100%;
    min-height: 120px;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.88rem;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 0.5rem;
    box-sizing: border-box;
}
.qr-review-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}
.qr-review-char-count {
    text-align: right;
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}
.qr-review-char-count.warning {
    color: #ef4444;
}

/* 제출 버튼 */
.qr-submit-btn {
    display: block;
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #10b981, #059669);
    cursor: pointer;
    transition: opacity 0.2s, transform 0.15s;
}
.qr-submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}
.qr-submit-btn:not(:disabled):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* ── 웹 접속 안내 (앱 유도) ── */
.qr-web-guide {
    text-align: center;
    padding: 3rem 1.25rem;
}
.qr-web-guide-icon {
    font-size: 3rem;
    color: #3b82f6;
    margin-bottom: 1rem;
}
.qr-web-guide h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.5rem;
}
.qr-web-guide p {
    font-size: 0.88rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 1.5rem;
}

/* ── 인라인 알림 ── */
.qr-inline-alert {
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    font-size: 0.82rem;
    margin-bottom: 0.75rem;
    animation: qr-fade-in 0.3s ease;
}
.qr-inline-alert.error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}
.qr-inline-alert.success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

@keyframes qr-fade-in {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── 이미 제출된 상태 ── */
.qr-already-submitted {
    text-align: center;
    padding: 2rem 1.25rem;
    background: #f0fdf4;
    border-radius: 12px;
    border: 1px solid #bbf7d0;
    margin-bottom: 1.25rem;
}
.qr-already-submitted i {
    font-size: 2rem;
    color: #10b981;
    margin-bottom: 0.75rem;
}
.qr-already-submitted h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #065f46;
    margin: 0 0 0.4rem;
}
.qr-already-submitted p {
    font-size: 0.85rem;
    color: #047857;
    margin: 0;
}
