﻿/* ==========================================================================
   會員入會 (REG) 樣式表
   ========================================================================== */

/* 步驟指示器 */
.reg-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0;
    padding: 0 20px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e0e0e0;
    color: #666;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #00a651;
    color: #fff;
}

.step.completed .step-number {
    background-color: #00a651;
    color: #fff;
}

.step-title {
    margin-top: 8px;
    font-size: 12px;
    color: #666;
    text-align: center;
    white-space: nowrap;
}

.step.active .step-title,
.step.completed .step-title {
    color: #00a651;
    font-weight: bold;
}

.step-line {
    flex: 1;
    height: 3px;
    background-color: #e0e0e0;
    margin: 0 10px;
    margin-bottom: 20px;
    min-width: 30px;
    max-width: 80px;
}

.step-line.completed {
    background-color: #00a651;
}

/* 表單容器 */
.reg-form-container {
    padding: 30px;
}

.reg-section-title {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
    font-weight: bold;
}

.reg-section-desc {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

/* 表單元素 */
.reg-form-group {
    margin-bottom: 20px;
}

.reg-form-group-sm {
    max-width: 120px;
}

.reg-form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.reg-form-row .reg-form-group {
    flex: 1;
    min-width: 200px;
}

/* 三欄布局 */
.reg-form-row-3 {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.reg-form-row-3 .reg-form-group {
    flex: 1;
    min-width: 150px;
}

.reg-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.reg-label-sm {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.reg-label.required::after {
    content: '*';
    color: #e74c3c;
    margin-left: 4px;
}

.reg-input,
.reg-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

#referrerModal .reg-modal-dialog {
    position: relative;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, .3);
    overflow: hidden;
}

#referrerModal .reg-modal-dialog.reg-modal-dialog-fullscreen {
    position: fixed !important;
    top: 5% !important;
    left: 5% !important;
    width: 90vw !important;
    max-width: 90vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
}

.reg-input:focus,
.reg-select:focus {
    outline: none;
    border-color: #00a651;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

.reg-input:read-only {
    background-color: #f5f5f5;
    color: #666;
}

.reg-input.error,
.reg-select.error {
    border-color: #e74c3c;
}

.reg-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #888;
}

.reg-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #e74c3c;
}

.reg-input-group {
    display: flex;
    gap: 10px;
}

.reg-input-group .reg-input {
    flex: 1;
}

.reg-input-group .reg-btn {
    flex-shrink: 0;
}

/* 按鈕 */
.reg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.reg-btn-primary {
    background-color: #00a651;
    color: #fff;
}

.reg-btn-primary:hover {
    background-color: #008c44;
}

.reg-btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.reg-btn-outline {
    background-color: #fff;
    color: #00a651;
    border: 1px solid #00a651;
}

.reg-btn-outline:hover {
    background-color: #f0fdf4;
}

.reg-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.reg-btn-group {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* 提示框 */
.reg-notice-box {
    background-color: #f8f9fa;
    border-left: 4px solid #00a651;
    padding: 15px 20px;
    margin: 25px 0;
    border-radius: 0 6px 6px 0;
}

.reg-notice-box h4 {
    margin: 0 0 10px 0;
    color: #00a651;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reg-notice-box ul {
    margin: 0;
    padding-left: 20px;
}

.reg-notice-box li {
    margin-bottom: 6px;
    font-size: 13px;
    color: #555;
}

/* 證件辨識區塊 */
.reg-card-recognition {
    border: 1px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.reg-card-recognition-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.reg-card-recognition-header i {
    color: #00a651;
}

.reg-card-recognition-body {
    padding: 20px;
}

.reg-card-recognition-body > p {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 14px;
}

.reg-upload-btns {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.reg-image-preview {
    margin-top: 15px;
    text-align: center;
    position: relative;
    display: inline-block;
}

.reg-image-preview img {
    max-width: 280px;
    max-height: 180px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.reg-btn-remove {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #e74c3c;
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    transition: background-color 0.3s ease;
}

.reg-btn-remove:hover {
    background-color: #c0392b;
}

/* 身分證正反面區塊 */
.reg-id-card-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 6px;
}

.reg-id-card-section:last-of-type {
    margin-bottom: 15px;
}

.reg-card-side-title {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* 辨識區塊 */
.reg-recognize-section {
    text-align: center;
    padding: 15px;
    background-color: #f0f9f4;
    border-radius: 6px;
    margin-top: 10px;
}

.reg-recognize-hint {
    margin: 10px 0 0 0;
    font-size: 13px;
    color: #666;
}

.reg-recognize-hint.ready {
    color: #00a651;
    font-weight: 500;
}

/* 確認勾選區塊 */
.reg-confirm-checkbox {
    margin-top: 15px;
    padding: 15px;
    background-color: #e8f5e9;
    border-radius: 6px;
    border: 1px solid #81c784;
}

.reg-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}

.reg-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #00a651;
}

/* 相機導引 */
.reg-camera-guide {
    text-align: center;
    margin-bottom: 15px;
}

.reg-camera-guide p {
    margin: 0;
    padding: 10px 15px;
    background-color: #fff3cd;
    border-radius: 6px;
    color: #856404;
    font-size: 14px;
}

/* QR Code 區塊 */
.reg-qrcode-section {
    border: 1px dashed #ddd;
    border-radius: 8px;
    margin-bottom: 25px;
    overflow: hidden;
}

.reg-qrcode-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.reg-qrcode-header i {
    color: #00a651;
}

.reg-qrcode-body {
    padding: 20px;
    text-align: center;
}

.reg-qrcode-body p {
    margin: 0 0 15px 0;
    color: #666;
    font-size: 14px;
}

.reg-qr-reader {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.reg-qr-hint {
    color: #666;
    font-size: 13px;
    margin-top: 10px;
}

/* 分隔線 */
.reg-divider {
    display: flex;
    align-items: center;
    margin: 25px 0;
}

.reg-divider::before,
.reg-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ddd;
}

.reg-divider span {
    padding: 0 15px;
    color: #888;
    font-size: 13px;
}

/* 推薦人驗證結果 */
.reg-referrer-result {
    background-color: #f0fdf4;
    border: 1px solid #00a651;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.reg-referrer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.reg-referrer-info > i {
    font-size: 32px;
    color: #00a651;
}

.reg-referrer-detail {
    display: flex;
    flex-direction: column;
    min-width: 120px;
}

.reg-referrer-label {
    font-size: 12px;
    color: #666;
}

.reg-referrer-value {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

/* 推薦人確認勾選區塊 */
.reg-referrer-confirm {
    background-color: #fff8e1;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 20px;
}

.reg-referrer-confirm .reg-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reg-referrer-confirm .reg-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #00a651;
    flex-shrink: 0;
}

.reg-referrer-confirm .reg-checkbox-group label {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
    cursor: pointer;
}

.reg-referrer-confirm .reg-error {
    margin-top: 8px;
    margin-left: 28px;
}

/* 確認頁面卡片 */
.reg-confirm-card {
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}

.reg-confirm-card-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.reg-confirm-card-header i {
    color: #00a651;
}

.reg-confirm-card-header .reg-edit-link {
    margin-left: auto;
    font-size: 13px;
    color: #00a651;
    text-decoration: none;
}

.reg-confirm-card-header .reg-edit-link:hover {
    text-decoration: underline;
}

.reg-confirm-card-body {
    padding: 15px 20px;
}

.reg-confirm-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.reg-confirm-row:last-child {
    border-bottom: none;
}

.reg-confirm-label {
    width: 140px;
    color: #666;
    font-size: 14px;
    flex-shrink: 0;
}

.reg-confirm-value {
    flex: 1;
    color: #333;
    font-size: 14px;
}

/* 同意條款區塊 */
.reg-terms-section {
    margin: 25px 0;
}

.reg-checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.reg-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #00a651;
}

.reg-checkbox-group label {
    font-size: 14px;
    color: #333;
    line-height: 1.5;
}

.reg-checkbox-group label a {
    color: #00a651;
    text-decoration: underline;
}

/* 完成頁面 */
.reg-complete-section {
    text-align: center;
    padding: 40px 20px;
}

.reg-complete-icon {
    font-size: 80px;
    color: #00a651;
    margin-bottom: 20px;
}

.reg-complete-title {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
}

.reg-complete-desc {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.reg-complete-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    display: inline-block;
}

.reg-complete-info-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 15px;
}

.reg-complete-info-item:last-child {
    margin-bottom: 0;
}

.reg-complete-info-item i {
    color: #00a651;
}

.reg-complete-info-item strong {
    color: #00a651;
    font-size: 18px;
}

.reg-complete-notice {
    text-align: left;
    background-color: #fff8e1;
    border-left: 4px solid #ffc107;
    padding: 20px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 30px;
}

.reg-complete-notice h4 {
    margin: 0 0 15px 0;
    color: #e65100;
    display: flex;
    align-items: center;
    gap: 8px;
}

.reg-complete-notice ol {
    margin: 0 0 15px 0;
    padding-left: 20px;
}

.reg-complete-notice li {
    margin-bottom: 8px;
    color: #333;
}

.reg-complete-note {
    margin: 0;
    color: #e65100;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

/* 會員登入狀態檢查中的頁面遮罩：半透明蓋在原頁面上，底下內容仍可見（有別於首次進站用的全螢幕 .loading-page） */
.member-check-mask {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1040;
}

/* 彈窗 */
.reg-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.reg-modal-content {
    background-color: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.reg-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.reg-modal-header h4 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.reg-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    line-height: 1;
}

.reg-modal-close:hover {
    color: #333;
}

/* Responsive address selector for mobile */
.citySelector {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.citySelector > * {
    min-width: 0; /* allow flex items to shrink properly */
}
.citySelector .zipcode,
.citySelector .county,
.citySelector .district,
.citySelector .neighbors,
.citySelector .street,
.citySelector .addressinput2 {
    flex: 0 1 auto;
}

@media (max-width: 767px) {
    .citySelector .zipcode,
    .citySelector .county,
    .citySelector .district,
    .citySelector .neighbors,
    .citySelector .street,
    .citySelector .addressinput2 {
        width: 100% !important;
        margin: 5px 0;
    }
    .reg-addr-row {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }
}

.reg-modal-body {
    padding: 20px;
    overflow-y: auto;
}

.reg-modal-body video {
    width: 100%;
    border-radius: 8px;
    background-color: #000;
}

/* Pickup Detail Modal */
.modal-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 16px;
}

.modal-overlay.is-open {
    display: flex !important;
}

.modal-box {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 620px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #029354;
    color: #fff;
}

.modal-title {
    font-size: 18px;
    font-weight: bold;
    letter-spacing: 1px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
    transition: opacity .2s;
}

.modal-close-btn:hover {
    opacity: .7;
}

.modal-body {
    padding: 24px 20px 16px;
    overflow-y: auto;
    max-height: 60vh;
}

.modal-qrcode-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.modal-qrcode-box {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 8px;
    background: #fafafa;
}

.modal-qrcode-box canvas {
    width: 100% !important;
    height: 100% !important;
}

.modal-table-wrap {
    width: 100%;
}

.modal-footer {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 22px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s, transform .15s;
}

.modal-btn:hover {
    opacity: .85;
    transform: translateY(-1px);
}

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

.download-btn {
    background: #029354;
    color: #fff;
}

.download-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}

.modal-fade-enter-active,
.modal-fade-leave-active {
    transition: opacity .25s ease;
}

.modal-fade-enter-active .modal-box,
.modal-fade-leave-active .modal-box {
    transition: transform .25s ease;
}

.modal-fade-enter,
.modal-fade-leave-to {
    opacity: 0;
}

.modal-fade-enter .modal-box,
.modal-fade-leave-to .modal-box {
    transform: translateY(-20px) scale(.97);
}

.modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.loading-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
    max-width: 320px;
}

.loading-text {
    font-size: 15px;
    color: #555;
    margin: 0;
    letter-spacing: 1px;
    white-space: nowrap;
}

.loading-bar-track {
    width: 100%;
    height: 14px;
    background: #e0e0e0;
    border-radius: 999px;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.loading-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    background: linear-gradient(90deg, #7cc47a, #029354);
    animation: loadingProgress 2s ease-in-out infinite;
}

.loading-label {
    font-size: 13px;
    font-weight: bold;
    color: #029354;
    letter-spacing: 3px;
    margin: 0;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
    }

    60% {
        width: 80%;
    }

    85% {
        width: 92%;
    }

    100% {
        width: 100%;
    }
}

.modal-fail {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 32px 16px;
    gap: 12px;
}

.modal-fail p {
    margin: 0;
    font-size: 15px;
    color: #888;
}

@media (max-width: 480px) {
    .modal-overlay.is-open {
        display: flex !important;
        align-items: flex-end !important;
        padding: 0 !important;
    }

    .modal-box {
        max-width: 100%;
        width: 100%;
        border-radius: 10px 10px 0 0;
        position: relative;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
    }

    .modal-body {
        flex: 1;
        overflow-y: auto;
        max-height: unset;
        -webkit-overflow-scrolling: touch;
    }

    .modal-footer,
    .modal-header {
        flex-shrink: 0;
    }

    .modal-footer {
        padding-bottom: calc(16px + env(safe-area-inset-bottom));
    }
}

#referrerModal .izi_header {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding-right: 90px;
    box-sizing: border-box;
}

#referrerModal .reg-modal-dialog {
    position: relative;
    background-color: #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, .3);
    overflow: hidden;
}

#referrerModal .reg-modal-dialog.reg-modal-dialog-fullscreen {
    position: fixed !important;
    inset: 5% !important;
    width: 90vw !important;
    max-width: 90vw !important;
    height: 90vh !important;
    max-height: 90vh !important;
}

@media (max-width: 480px) {
    #referrerModal .reg-modal-dialog {
        height: auto !important;
        max-height: 73vh !important;
    }
}

#referrerModal .iziModal-header-buttons {
    position: absolute;
    top: 14px;
    right: 12px;
    transform: none;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 5;
}

#referrerModal .iziModal-header-buttons .iziModal-button {
    display: block;
    outline: 0;
    height: 34px;
    width: 34px;
    border: 0;
    padding: 0;
    margin: 0;
    opacity: .3;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.16, 0.81, 0.32, 1), opacity 0.3s ease;
    background-size: 67% !important;
    -webkit-tap-highlight-color: transparent;
}

#referrerModal .iziModal-header-buttons .iziModal-button:hover {
    opacity: .7;
}

#referrerModal .iziModal-header-buttons .reg-modal-close {
    display: block;
    outline: 0;
    height: 34px;
    width: 34px;
    border: 0;
    padding: 0;
    margin: 0;
    opacity: .3;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.16, 0.81, 0.32, 1), opacity 0.3s ease;
    background: url(/images/close.png) no-repeat 50% 50%;
    background-size: 67% !important;
    -webkit-tap-highlight-color: transparent;
    color: transparent;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

#referrerModal .iziModal-header-buttons .reg-modal-close:hover {
    opacity: .7;
}

#referrerModal .iziModal-header-buttons .reg-modal-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    outline: 0;
    height: 34px;
    width: 34px;
    border: 0;
    padding: 0;
    margin: 0;
    opacity: .3;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.16, 0.81, 0.32, 1), opacity 0.3s ease;
    background-size: 67% !important;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
    background-color: rgba(255, 255, 255, .9);
}

#referrerModal .iziModal-header-buttons .reg-modal-icon-btn:hover {
    opacity: .7;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-close {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6ODZCQkIzQ0I0RTg0MTFFNjlBODI4QTFBRTRBMkFCMDQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6ODZCQkIzQ0M0RTg0MTFFNjlBODI4QTFBRTRBMkFCMDQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZD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pml6rAJ6oY6Eu5NfvfF7QTeWWQyEsZr6694lwsNoPD8mKRo29gCNwGj7gXi7aGA1EBcY+8vq0GW8FmJb3Pgx9gEnwAr8Ab8MW2w0UBBgAVyyyaohV7ewAAAABJRU5ErkJggg==) no-repeat 50% 50%;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-fullscreen {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTMyIDc5LjE1OTI4NCwgMjAxNi8wNC8xOS0xMzoxMzo0MCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RTBBOUI4RUM0RTg0MTFFNjk0NTY4NUNFRkZFNEFEQzIiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5k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AZhIq+b3Lu09EyHRwRgO+0C+7dhWcII+PwCf6Sk/Aa9d2vtn+A7nyASugJiD6YSDQcOlvVbxiCaAN8xrs3sgprBiac/QhlhnzjUo6JuZM0UlDS5FPtoQIdNlPYJTWUihFaDex+9Pg6T1KHJAJ2NI7ASllA28hEQ/KJIXoSlwgKlnh+jFe+GjLtwIPtjfyktUt+UaUZWqvw7H3oJD1peI7eQdoF1xWa+zQikHH13OmwqmOxxP0EiZtgK/DRwNuIcHwSeXc2K01WAPhbhKBb5hBNTVbskVH7fqpZGhbJUNtYF83fqwQSXPbOsGjb6etwx2gcEsmT3iFAZeNmUqaMeHSz2qu0k6W15Rqsx3B2i0D+xXGAHTFrRVlEeFuVoqH+ku6VNUbDkPzlAtg30nVK66i8rRIjAbTKaSQVQyN0DD6nOqcLZQld9TLfmvAAMAeMcvp3eCFqQAAAAASUVORK5CYII=) no-repeat 50% 50%;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-close::before,
#referrerModal .iziModal-header-buttons .reg-modal-btn-fullscreen::before {
    display: block;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 18px;
    line-height: 34px;
    text-align: center;
    color: #666;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-close::before {
    content: none;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-fullscreen::before {
    content: none;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-fullscreen.is-fullscreen::before {
    content: none;
}

#referrerModal .iziModal-header-buttons .reg-modal-btn-fullscreen.is-fullscreen {
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACwAAAAsCAYAAAAehFoBAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0i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Modal .iziModal-header-buttons .iziModal-button-close {
    background: url(/images/close.png) no-repeat 50% 50%;
}

#referrerModal .iziModal-header-buttons .iziModal-button-fullscreen {
    background: url(/images/fullscreen.png) no-repeat 50% 50%;
}

#referrerModal .izi_maincon {
    margin-top: 10px !important;
    padding: 0 40px 40px;
}

#referrerModal .iziModal-content {
    background-color: #fff;
    width: 100%;
    border-radius: 3px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#referrerModal .iziModal-wrap {
    width: 100%;
}

.reg-modal-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding: 15px 20px;
    border-top: 1px solid #eee;
}

.reg-mobile-only {
    display: none;
}

/* RWD 響應式 */
@media (max-width: 768px) {
    .reg-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step-line {
        display: none;
    }

    .step {
        width: calc(20% - 10px);
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }

    .step-title {
        font-size: 10px;
    }

    .reg-form-container {
        padding: 20px 15px;
    }

    .reg-form-row {
        flex-direction: column;
        gap: 0;
    }

    .reg-form-row .reg-form-group {
        min-width: 100%;
    }

    .reg-btn-group {
        flex-direction: column-reverse;
    }

    .reg-btn {
        width: 100%;
    }

    .reg-confirm-row {
        flex-direction: column;
        gap: 5px;
    }

    .reg-confirm-label {
        width: 100%;
        font-weight: 500;
    }

    .reg-upload-btns {
        flex-direction: column;
    }

    .reg-upload-btns .reg-btn {
        width: 100%;
    }

    .reg-mobile-only {
        display: inline-block;
    }
}

/* 橘色文字 */
.orangecolor {
    color: #ff6600;
}

/* 通訊地址區塊 */
.reg-address-section {
    margin-bottom: 20px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.reg-address-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 10px;
}

.reg-address-header .reg-label {
    margin-bottom: 0;
}

.reg-checkbox-inline {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reg-checkbox-inline input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #00a651;
}

.reg-checkbox-inline label {
    font-size: 14px;
    color: #333;
    cursor: pointer;
}

/* 可搜尋選單 */
.reg-searchable-wrapper {
    position: relative;
    width: 100%;
}

.reg-searchable-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #00a651;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    background-color: #fff;
    z-index: 10;
}

.reg-searchable-input:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 166, 81, 0.1);
}

/* REG001_002 戶籍地址排版 */
.reg-addr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: nowrap;
}

.reg-addr-row-bottom {
    margin-top: 6px;
}

#selCityMerged {
    width: 120px;
    min-width: 120px;
    flex: 0 0 120px;
}

#selCity {
    width: 120px;
    min-width: 120px;
    flex: 0 0 120px;
}

#selTownMerged {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

#selTown {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

#selRoadMerged {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

#selStreet {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

#selDeliveryCity {
    width: 120px;
    min-width: 120px;
    flex: 0 0 120px;
}

#selDeliveryTown {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

#selDeliveryStreet {
    width: 150px;
    min-width: 150px;
    flex: 0 0 150px;
}

/* Mobile: stack address selects/inputs full width */
@media (max-width: 768px) {
    #zipcodeMerged,
    #perNeighborMerged,
    #txtZipCode,
    #selCityMerged,
    #selCity,
    #selTownMerged,
    #selTown,
    #selRoadMerged,
    #selStreet,
    #selDeliveryCity,
    #selDeliveryTown,
    #selDeliveryStreet,
    #txtAddressDetail {
        width: 100%;
        min-width: 0;
        flex: 0 0 100%;
        box-sizing: border-box;
    }

    /* ensure zipcode and address detail also full width */
    .citySelector_havvalue .zipcode,
    .reg-addr-row-bottom .street,
    .reg-addr-detail,
    .citySelector_havvalue > * {
        width: 100%;
        min-width: 0;
        display: block;
        box-sizing: border-box;
    }
}

.reg-addr-detail {
    flex: 1;
    min-width: 0;
}

.reg-mobile-inline-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: nowrap;
}

.reg-mobile-country-row {
    display: flex;
    align-items: center;
}

/* Desktop-specific: ensure home telephone items stay inline and don't expand */
@media (min-width: 769px) {
    .reg-home-tel-row {
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
    }

    .reg-home-tel-row .reg-home-tel-item {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
        flex: 0 0 auto; /* keep each item its intrinsic width */
    }

    .reg-home-tel-row .reg-home-tel-item .inputstyle {
        /*width: auto;*/
        flex: 0 0 auto;
        display: inline-block;
    }

    .reg-home-tel-row .reg-inline-separator-phone {
        display: inline-flex;
        margin-left: 6px;
        align-self: center;
    }
}

.reg-select-searchable {
    width: 100%;
}

/* 必填標記 */
.required-mark {
    color: #e74c3c;
    font-weight: bold;
    margin-right: 2px;
}

/* 同意條款區塊間距調整 */
.reg-terms-section + .reg-terms-section {
    margin-top: 15px;
}

/* ==========================================================================
   購買入會資料袋 (REG007a) 樣式
   ========================================================================== */

/* 資料袋資訊區塊 */
.reg-databag-info {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f0fdf4 0%, #e8f5e9 100%);
    border: 2px solid #00a651;
    border-radius: 12px;
    margin-bottom: 30px;
}

.reg-databag-icon {
    width: 60px;
    height: 60px;
    background-color: #00a651;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reg-databag-icon i {
    font-size: 28px;
    color: #fff;
}

.reg-databag-detail h4 {
    margin: 0 0 5px 0;
    font-size: 18px;
    color: #333;
}

.reg-databag-price {
    margin: 0;
    font-size: 24px;
    font-weight: bold;
    color: #00a651;
}

/* 區塊標題 */
.reg-section-block {
    margin-bottom: 30px;
    padding: 20px;
    background-color: #fafafa;
    border-radius: 8px;
    border: 1px solid #eee;
}

.reg-block-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #00a651;
    font-size: 16px;
    color: #333;
}

.reg-block-title i {
    color: #00a651;
}

/* Radio 群組樣式 */
.reg-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.reg-radio-item {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.reg-radio-item input[type="radio"] {
    display: none;
}

.reg-radio-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.reg-radio-label i {
    font-size: 20px;
    color: #666;
}

.reg-radio-item input[type="radio"]:checked + .reg-radio-label {
    border-color: #00a651;
    background-color: #f0fdf4;
}

.reg-radio-item input[type="radio"]:checked + .reg-radio-label i {
    color: #00a651;
}

/* 垂直 Radio 群組 */
.reg-radio-group-vertical {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.reg-radio-item-block {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.reg-radio-item-block input[type="radio"] {
    margin-right: 12px;
    margin-top: 4px;
    width: 18px;
    height: 18px;
    accent-color: #00a651;
}

.reg-radio-content {
    display: flex;
    flex-direction: column;
}

.reg-radio-title {
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.reg-radio-desc {
    font-size: 13px;
    color: #666;
    margin-top: 2px;
}

/* 取貨/發票區塊 */
.reg-pickup-section,
.reg-invoice-section {
    margin-top: 20px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #eee;
}

/* 成功訊息樣式 */
.reg-success {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #00a651;
}

/* ==========================================================================
   完成頁面 (REG008) 樣式
   ========================================================================== */

/* QR Code 自取區塊 */
.reg-qrcode-pickup {
    background-color: #f0fdf4;
    border: 2px solid #00a651;
    border-radius: 12px;
    padding: 25px;
    margin: 30px auto;
    max-width: 400px;
    text-align: center;
}

.reg-qrcode-pickup h4 {
    margin: 0 0 10px 0;
    color: #00a651;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reg-qrcode-pickup p {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 14px;
}

.reg-qrcode-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.reg-qrcode-container canvas,
.reg-qrcode-container img {
    border-radius: 8px;
    border: 1px solid #ddd;
}

.reg-qrcode-value {
    font-family: monospace;
    font-size: 16px;
    font-weight: bold;
    color: #333;
    background-color: #fff;
    padding: 8px 15px;
    border-radius: 4px;
    display: inline-block;
}

/* 宅配提醒區塊 */
.reg-delivery-notice {
    background-color: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 25px;
    margin: 30px auto;
    max-width: 400px;
    text-align: center;
}

.reg-delivery-notice h4 {
    margin: 0 0 10px 0;
    color: #1976d2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.reg-delivery-notice p {
    margin: 0;
    color: #333;
    font-size: 14px;
}

/* RWD 響應式補充 */
@media (max-width: 768px) {
    .reg-databag-info {
        flex-direction: column;
        text-align: center;
    }

    .reg-form-container {
        padding: 15px;
    }

    .reg-mobile-inline-row,
    .btncenter {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .recommenderbtns {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: flex-start;
        gap: 10px;
    }

    .reg-mobile-inline-row {
        gap: 10px;
    }

    .reg-mobile-inline-row > div {
        width: 100%;
    }

    .reg-inline-separator {
        display: none;
    }

    .reg-inline-separator-country {
        display: inline-flex;
        margin-left: 8px;
    }

    .reg-home-tel-row {
        flex-direction: column;
        align-items: flex-start;
        flex-wrap: nowrap;
    }

    .reg-home-tel-item {
        display: inline-flex;
        align-items: center;
    }

    .reg-home-tel-item input.inputstyle {
        max-width: none;
        min-width: 0;
    }

    .reg-inline-separator-phone {
        display: inline-flex;
        margin-left: 8px;
    }

    .reg-mobile-inline-row input.inputstyle,
    .formstyle input.w100,
    .formstyle input.w120,
    .formstyle input.w150,
    .formstyle input.w200,
    .formstyle input.w310 {
        max-width: 100%;
        min-width: 0;
    }

    .reg-home-tel-row input.w100,
    .reg-home-tel-row input.w150,
    .reg-home-tel-row input.w200 {
        max-width: none;
    }

    .btncenter {
        gap: 10px;
    }

    .reg-radio-group {
        flex-direction: column;
    }

    .reg-radio-label {
        width: 100%;
        justify-content: center;
    }

    .reg-form-row-3 {
        flex-direction: column;
    }

    .reg-form-row-3 .reg-form-group {
        min-width: 100%;
    }

    /* Stronger mobile stacking for address fields to ensure one-per-row order */
    .reg-form-container .citySelector_havvalue,
    .reg-form-container .reg-addr-row-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .reg-form-container .citySelector_havvalue > *,
    .reg-form-container .reg-addr-row-bottom > * {
        display: block;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        margin-bottom: 6px;
    }

    /* ensure address detail input fills width */
    .reg-form-container .reg-addr-detail {
        width: 100%;
        box-sizing: border-box;
    }

    /* REG007 specific: ensure pickup/address/phone fields stack one-per-row on mobile
       and hide inline '-' separators by collapsing container font-size then restoring
       font-size on controls. */
    .reg-mobile-inline-row,
    .citySelector_havvalue.reg-addr-row,
    .reg-addr-row.reg-addr-row-bottom {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        font-size: 0; /* hide stray text dashes between inline controls */
    }

    .reg-mobile-inline-row > div,
    .citySelector_havvalue.reg-addr-row > *,
    .reg-addr-row.reg-addr-row-bottom > * {
        display: block;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        margin-bottom: 6px;
        font-size: 16px; /* restore for controls */
    }

    /* Ensure specific inputs/selects fill width */
    #txtDeliveryZipCode,
    #selDeliveryCity,
    #selDeliveryTown,
    #selDeliveryStreet,
    #txtDeliveryDetail {
        width: 100%;
        min-width: 0;
        display: block;
        box-sizing: border-box;
        margin-bottom: 6px;
        font-size: 16px;
    }
}

