/* =============================================================
   주문 페이지 전용 스타일
   - 좌측 포스터 슬라이더
   - 우측 mRNA 주문 폼
   ============================================================= */

/* ----------- 포스터 슬라이더 ----------- */
.order-poster-slider {
    position: relative;
    width: 100%;
    margin-top: 24px;
    border-radius: 12px;
    overflow: hidden;
    background: #f5f5f7;
    aspect-ratio: 2528 / 3555;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.06);
    touch-action: pan-y;
    cursor: grab;
}

.order-poster-slider:active {
    cursor: grabbing;
}

.order-poster-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.order-poster-track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}

.order-poster-track.no-anim {
    transition: none;
}

.order-poster-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    user-select: none;
}

.order-poster-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}

.order-poster-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.85);
    color: #1a1a1a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.order-poster-nav:hover:not(:disabled) {
    background: #fff;
}

.order-poster-nav:disabled {
    opacity: 0;
    pointer-events: none;
}

.order-poster-nav.prev {
    left: 12px;
}

.order-poster-nav.next {
    right: 12px;
}

.order-poster-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 2;
}

.order-poster-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-poster-dot.active {
    background: #fff;
}

/* ----------- PDF 다운로드 버튼 ----------- */
.order-pdf-download {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    text-decoration: none;
    transition: all 0.2s ease;
}

.order-pdf-download:hover {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.order-pdf-download>i:first-child {
    width: 28px;
    height: 28px;
    color: #dc2626;
    flex-shrink: 0;
}

.order-pdf-download-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.order-pdf-download-text strong {
    font-size: 14px;
    font-weight: 600;
}

.order-pdf-download-text small {
    font-size: 12px;
    color: #6b7280;
    margin-top: 2px;
}

.order-pdf-download:hover .order-pdf-download-text small {
    color: #1d4ed8;
}

.order-pdf-download-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ----------- 주문 폼 공통 ----------- */
.order-form-wrapper {
    width: 100%;
}

/* 주문 페이지에서는 form 제목/우측 컬럼 패딩을 살짝 압축한다. */
#location .contact-form-title {
    font-size: 20px;
    margin-bottom: 14px;
}

.order-form-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.order-form-section:last-of-type {
    border-bottom: none;
}

.order-form-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 10px;
}

.order-form-section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.order-form-section-head .order-form-section-title {
    margin: 0;
}

.order-form-hint {
    font-size: 11px;
    color: #6b7280;
    margin: 0 0 8px;
}

.order-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
}

.order-field {
    display: flex;
    flex-direction: column;
}

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

.order-aliquot-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.order-field label {
    font-size: 12px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 3px;
}

.order-field label small {
    font-weight: 400;
    color: #9ca3af;
    margin-left: 4px;
    font-size: 11px;
}

.order-hint-value {
    color: #dc2626;
    font-weight: 600;
}

/* mRNA Synthesis 시 Lipid formulation 처럼 비활성화된 필드 (엑셀의 회색 행 느낌) */
.order-field.is-disabled label {
    color: #9ca3af;
}

.order-field.is-disabled select,
.order-field.is-disabled input {
    background: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #d1d5db;
}

/* 입력 필드 안쪽에 단위 표시 (Amount/Concentration/Aliquot)
   - 입력칸과 단위가 같은 시각적 박스를 공유하지만 레이아웃은 flex 로 분리해
     값과 단위가 절대로 겹치지 않도록 한다. */
.order-input-unit {
    display: flex;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    transition: border-color 0.2s ease;
}

.order-input-unit:focus-within {
    border-color: #2563eb;
}

.order-field .order-input-unit input[type="number"] {
    flex: 1;
    min-width: 0;
    width: auto;
    border: none;
    padding: 6px 4px 6px 10px;
    text-align: right;
    background: transparent;
    color: #111827;
    font-size: 13px;
    line-height: 1.4;
    font-family: inherit;
    -moz-appearance: textfield;
}

.order-field .order-input-unit input[type="number"]:focus {
    outline: none;
}

.order-input-unit input::-webkit-outer-spin-button,
.order-input-unit input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.order-input-unit-suffix {
    display: flex;
    align-items: center;
    padding: 0 10px 0 4px;
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
    pointer-events: none;
}

.order-field input[type="text"],
.order-field input[type="email"],
.order-field input[type="number"],
.order-field select,
.order-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.4;
    font-family: inherit;
    background: #fff;
    color: #111827;
    transition: border-color 0.2s ease;
}

.order-field input:focus,
.order-field select:focus,
.order-field textarea:focus {
    outline: none;
    border-color: #2563eb;
}

.order-field textarea {
    resize: vertical;
    min-height: 44px;
}

.required {
    color: #dc2626;
}

/* ----------- 주문 안내 박스 ----------- */
.order-form-notice {
    border: 1px dashed #16a34a;
    background: #f0fdf4;
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 16px;
}

.order-form-notice-title {
    color: #dc2626;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 4px;
}

.order-form-notice-list {
    margin: 0;
    padding-left: 16px;
    font-size: 12px;
    line-height: 1.5;
    color: #374151;
}

.order-form-notice-list li {
    list-style: disc;
}

/* ----------- 토글식 체크 (다른 input과 높이 통일) ----------- */
.order-toggle {
    display: flex;
    gap: 8px;
}

.order-toggle-option {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #fff;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 0;
    flex: 1;
}

.order-toggle-option:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

/* ----------- 라디오 / 체크 ----------- */
.order-radio-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.order-radio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 13px;
    color: #374151;
    background: #fff;
}

.order-radio:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
    color: #1d4ed8;
}

.order-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    line-height: 1.45;
    color: #374151;
    cursor: pointer;
}

.order-check input[type="checkbox"] {
    margin-top: 2px;
    flex-shrink: 0;
}

/* ----------- RNA 카드 ----------- */
.order-add-rna-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border: 1px solid #2563eb;
    background: #fff;
    color: #2563eb;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.order-add-rna-btn:hover:not(:disabled) {
    background: #eff6ff;
}

.order-add-rna-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.order-add-rna-btn i {
    width: 14px;
    height: 14px;
}

.order-rna-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.order-rna-card {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 10px 12px;
    background: #f9fafb;
}

.order-rna-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.order-rna-card-title {
    font-weight: 600;
    color: #111827;
    font-size: 13px;
}

.order-rna-remove {
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.order-rna-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}

.order-rna-remove i {
    width: 16px;
    height: 16px;
}

/* RNA 카드가 1건뿐일 때 삭제 버튼 숨김 */
.order-rna-list .order-rna-card:only-child .order-rna-remove {
    display: none;
}

/* ----------- 제출 / 에러 ----------- */
.order-form-actions {
    margin-top: 16px;
}

.order-form-error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 13px;
}

.order-field-error {
    display: none;
    margin-top: 6px;
    color: #b91c1c;
    font-size: 12px;
    line-height: 1.4;
}

.order-field-error.is-visible {
    display: block;
}

.order-input-unit.is-invalid {
    border-color: #ef4444;
}

.order-submit-btn {
    width: 100%;
    padding: 10px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.order-submit-btn:hover:not(:disabled) {
    background: #1e40af;
}

.order-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ----------- 성공 모달 ----------- */
.order-success-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.order-success-modal.show {
    display: flex;
}

.order-success-modal-inner {
    background: #fff;
    border-radius: 12px;
    padding: 32px 28px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.order-success-icon {
    color: #16a34a;
    margin-bottom: 12px;
}

.order-success-icon i {
    width: 48px;
    height: 48px;
}

.order-success-modal-inner h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #111827;
}

.order-success-modal-inner p {
    margin: 0 0 20px;
    color: #6b7280;
    font-size: 14px;
}

.order-success-btn {
    padding: 10px 24px;
    background: #1d4ed8;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
}

/* ----------- 스텝 인디케이터 ----------- */
.order-step-indicator {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 12px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.order-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.order-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, color 0.2s;
}

.order-step-label {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
    transition: color 0.2s;
}

.order-step-item.active .order-step-num {
    background: #1d4ed8;
    color: #fff;
}

.order-step-item.active .order-step-label {
    color: #1d4ed8;
}

.order-step-item.done .order-step-num {
    background: #16a34a;
    color: #fff;
}

.order-step-item.done .order-step-label {
    color: #16a34a;
}

.order-step-divider {
    flex: 0 0 32px;
    height: 2px;
    background: #e5e7eb;
    margin: 0 8px;
    border-radius: 1px;
}

/* ----------- 폼 하단 버튼 행 ----------- */
.order-form-actions-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.order-form-actions-row .order-submit-btn {
    flex: 1;
}

.order-back-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 16px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    white-space: nowrap;
}

.order-back-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

/* ----------- 반응형 ----------- */
@media (max-width: 768px) {
    .order-form-grid {
        grid-template-columns: 1fr;
    }

    .order-poster-slider {
        aspect-ratio: 2528 / 3555;
    }
}