/**
 * Pet ID Card Form Styles
 * Following theme variables: --primary: #299481, --highlight: #ce202e, font: Averta
 */

/* ==================== CSS Variables ==================== */
:root {
    --pet-id-primary: #299481;
    --pet-id-primary-dark: #1f7366;
    --pet-id-primary-light: #3ba896;
    --pet-id-highlight: #ce202e;
    --pet-id-success: #28a745;
    --pet-id-warning: #ffc107;
    --pet-id-danger: #dc3545;
    --pet-id-light: #f8f9fa;
    --pet-id-dark: #333;
    --pet-id-gray: #6c757d;
    --pet-id-border: #dee2e6;
    --pet-id-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --pet-id-radius: 8px;
    --pet-id-transition: all 0.3s ease;
}

/* ==================== Page Wrapper ==================== */
.pet-id-page-wrapper {
    font-family: "Averta", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--pet-id-dark);
    line-height: 1.6;
}

/* ==================== Hero Section ==================== */
.pet-id-hero {
    position: relative;
    background: linear-gradient(135deg, var(--pet-id-primary) 0%, var(--pet-id-primary-dark) 100%);
    padding: 80px 20px;
    text-align: center;
    color: white;
    overflow: hidden;
}

.pet-id-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* ==================== Main Content ==================== */
.pet-id-main {
    padding: 40px 20px;
    background: var(--pet-id-light);
}

.pet-id-content-wrapper {
    max-width: 1400px;
    margin: 0 auto;
}

/* ==================== Container Layout ==================== */
.pet-id-container {
    background: white;
    border-radius: var(--pet-id-radius);
    box-shadow: var(--pet-id-shadow);
    overflow: visible;
    /* Changed from hidden to enable sticky positioning */
}

.pet-id-row {
    display: flex;
    flex-wrap: wrap;
}

.pet-id-form-area {
    flex: 0 0 65%;
    max-width: 65%;
    padding: 30px;
    border-right: 1px solid var(--pet-id-border);
}

.pet-id-preview-area {
    flex: 0 0 35%;
    max-width: 35%;
    padding: 30px;
    background: #f5f7f9;
}

/* ==================== Progress Bar ==================== */
.pet-id-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 20px;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--pet-id-border);
    color: var(--pet-id-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    transition: var(--pet-id-transition);
    margin-bottom: 8px;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
    background: var(--pet-id-primary);
    color: white;
}

.progress-step.completed .step-number {
    background: var(--pet-id-success);
    font-size: 0;
    /* Ã¡ÂºÂ¨n sÃ¡Â»â€˜ */
}

.progress-step.completed .step-number::after {
    content: '✓';
    font-size: 1rem;
    /* HiÃ¡Â»Æ’n thÃ¡Â»â€¹ tick vÃ¡Â»â€ºi kÃƒÂ­ch thÃ†Â°Ã¡Â»â€ºc chuÃ¡ÂºÂ©n */
    font-weight: 700;
    line-height: 1;
}

.step-title {
    font-size: 0.75rem;
    color: var(--pet-id-gray);
    text-align: center;
    transition: var(--pet-id-transition);
}

.progress-step.active .step-title {
    color: var(--pet-id-primary);
    font-weight: 600;
}

.progress-line {
    flex: 1;
    height: 3px;
    background: var(--pet-id-border);
    margin: 0 10px;
    margin-bottom: 28px;
    transition: var(--pet-id-transition);
}

.progress-line.active {
    background: var(--pet-id-primary);
}

/* ==================== Form Steps ==================== */
.pet-id-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--pet-id-primary);
}

/* ==================== Form Sections ==================== */
.form-section {
    margin-bottom: 30px;
    padding: 25px;
    background: #fafbfc;
    border-radius: var(--pet-id-radius);
    border: 1px solid var(--pet-id-border);
}

.section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pet-id-dark);
    margin-bottom: 10px;
}

.section-desc {
    color: var(--pet-id-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

/* ==================== Form Elements ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* 3-column row for Emergency Contact */
.form-row-3 {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.form-row-3 .form-group {
    flex: 1 1 calc(33.333% - 14px);
    min-width: 180px;
    margin-bottom: 0;
}

/* Emergency Contact description */
.emergency-contact-desc {
    font-size: 0.88rem;
    color: var(--pet-id-gray);
    font-style: italic;
    margin-bottom: 18px;
    margin-top: 4px;
}



label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--pet-id-dark);
}

label small {
    display: inline-block;
    font-weight: 400;
    color: var(--pet-id-gray);
    margin-left: 5px;
    font-size: 0.85em;
}

.required {
    color: var(--pet-id-highlight);
}

/* Standard inputs and selects */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select,
textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--pet-id-transition);
    background: white;
    box-sizing: border-box !important;
    -webkit-appearance: none;
    appearance: none;
}

/* Custom appearance for native selects within the form */
.form-group select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Flatpickr Datepicker improvements */
.form-group .datepicker {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236c757d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px !important;
    cursor: pointer;
}

/* Ensure native date inputs on mobile match style */
input[type="date"] {
    position: relative;
    min-height: 48px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    background: transparent;
    bottom: 0;
    color: transparent;
    cursor: pointer;
    height: auto;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    width: auto;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--pet-id-primary);
    box-shadow: 0 0 0 3px rgba(41, 148, 129, 0.1);
}

input.error,
select.error {
    border-color: var(--pet-id-danger);
}

/* Select2 (Country) – match form input/select style */
.form-group .select2-container {
    width: 100% !important;
}

.form-group .select2-container .select2-selection--single {
    height: auto;
    min-height: 48px;
    padding: 12px 35px 12px 15px;
    border: 2px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    background: white;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--pet-id-transition);
}

.form-group .select2-container--focus .select2-selection--single,
.form-group .select2-container--open .select2-selection--single {
    outline: none;
    border-color: var(--pet-id-primary);
    box-shadow: 0 0 0 3px rgba(41, 148, 129, 0.1);
}

.form-group .select2-container .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
    line-height: 1.5;
    color: var(--pet-id-dark);
}

.form-group .select2-container .select2-selection--single .select2-selection__arrow {
    height: 44px;
    right: 12px;
}

/* Fix for Select2 on mobile to avoid horizontal shift */
.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-left: 0;
}

.form-hint {
    font-size: 0.85rem;
    color: var(--pet-id-gray);
    margin-top: 5px;
}

/* ==================== Quantity Input ==================== */
.quantity-input-wrapper {
    display: inline-flex;
    align-items: center;
    border: 2px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    overflow: hidden;
}

.qty-btn {
    width: 45px;
    height: 45px;
    border: none;
    background: var(--pet-id-light);
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--pet-id-transition);
}

.qty-btn:hover {
    background: var(--pet-id-primary);
    color: white;
}

.quantity-input-wrapper input[type="number"] {
    width: 70px;
    text-align: center;
    border: none;
    border-radius: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.quantity-input-wrapper input[type="number"]::-webkit-outer-spin-button,
.quantity-input-wrapper input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==================== Checkbox & Radio ==================== */
.checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 35px;
}

.checkbox-wrapper input[type="checkbox"],
.checkbox-wrapper input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid var(--pet-id-border);
    border-radius: 4px;
    transition: var(--pet-id-transition);
}

.checkbox-wrapper:hover .checkmark {
    border-color: var(--pet-id-primary);
}

.checkbox-wrapper input:checked~.checkmark {
    background: var(--pet-id-primary);
    border-color: var(--pet-id-primary);
}

.checkmark::after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-wrapper input:checked~.checkmark::after {
    display: block;
}

.checkbox-label {
    font-weight: normal;
    color: var(--pet-id-dark);
}

.contact-methods-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    margin-top: 8px;
}

.contact-methods-group .checkbox-wrapper {
    margin-bottom: 0;
}

/* ==================== Size Options ==================== */
.size-options {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.size-option {
    cursor: pointer;
}

.size-option input {
    display: none;
}

.size-card {
    display: block;
    padding: 20px 30px;
    border: 2px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    text-align: center;
    transition: var(--pet-id-transition);
}

.size-option:hover .size-card {
    border-color: var(--pet-id-primary);
}

.size-option input:checked+.size-card {
    border-color: var(--pet-id-primary);
    background: rgba(41, 148, 129, 0.1);
}

.size-name {
    display: block;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--pet-id-primary);
    margin-bottom: 5px;
}

.size-dimension {
    font-size: 0.9rem;
    color: var(--pet-id-gray);
}

/* ==================== File Upload ==================== */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border: 2px dashed var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    background: var(--pet-id-light);
    cursor: pointer;
    transition: var(--pet-id-transition);
}

.file-label:hover {
    border-color: var(--pet-id-primary);
    background: rgba(41, 148, 129, 0.05);
}

.file-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.file-text {
    color: var(--pet-id-gray);
}

.file-preview {
    margin-top: 15px;
}

.file-preview img {
    max-width: 150px;
    max-height: 150px;
    border-radius: var(--pet-id-radius);
    box-shadow: var(--pet-id-shadow);
}

/* File upload error state */
.file-upload-wrapper.has-error .file-label {
    border-color: var(--pet-id-danger);
    background: rgba(220, 53, 69, 0.05);
}

.file-error-message {
    color: var(--pet-id-danger);
    font-size: 0.85rem;
    font-weight: normal;
    margin-top: 5px;
    display: block;
}

/* ==================== Pet Photo Crop Modal ==================== */
.crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.crop-modal-content {
    background: #fff;
    border-radius: 12px;
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

.crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--pet-id-border);
}

.crop-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pet-id-dark);
}

.crop-modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--pet-id-gray);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--pet-id-transition);
    line-height: 1;
}

.crop-modal-close:hover {
    background: var(--pet-id-light);
    color: var(--pet-id-dark);
}

.crop-container {
    width: 100%;
    height: 420px;
    overflow: hidden;
    background: #1a1a2e;
    position: relative;
}

.crop-container img {
    display: block;
    max-width: 100%;
}

.crop-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--pet-id-border);
    background: var(--pet-id-light);
}

.crop-tool-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--pet-id-border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    color: var(--pet-id-gray);
    transition: var(--pet-id-transition);
}

.crop-tool-btn:hover {
    border-color: var(--pet-id-primary);
    color: var(--pet-id-primary);
    background: rgba(41, 148, 129, 0.05);
}

.crop-tool-btn:active {
    transform: scale(0.95);
}

.crop-tool-btn svg {
    pointer-events: none;
}

.crop-actions {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--pet-id-border);
}

.crop-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: var(--pet-id-radius);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--pet-id-transition);
    font-family: inherit;
}

.crop-btn-cancel {
    background: var(--pet-id-light);
    color: var(--pet-id-gray);
    border: 1px solid var(--pet-id-border);
}

.crop-btn-cancel:hover {
    background: #e9ecef;
}

.crop-btn-confirm {
    background: var(--pet-id-primary);
    color: #fff;
}

.crop-btn-confirm:hover {
    background: var(--pet-id-primary-dark);
}

.crop-btn-confirm:active {
    transform: scale(0.98);
}

@media (max-width: 600px) {
    .crop-modal {
        padding: 0;
    }

    .crop-modal-content {
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100%;
    }

    .crop-container {
        height: 0;
        flex: 1;
    }

    .crop-toolbar {
        gap: 6px;
        padding: 10px 16px;
    }

    .crop-tool-btn {
        width: 36px;
        height: 36px;
    }

    .crop-actions {
        padding: 12px 16px;
    }

    .crop-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
}

/* ==================== Price Summary ==================== */
.price-summary {
    background: white !important;
}

.price-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--pet-id-border);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.total {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    padding-top: 15px;
    margin-top: 5px;
    border-top: 2px solid var(--pet-id-primary);
}

/* ==================== Owner/Pet Forms ==================== */
.owner-form,
.pet-form {
    background: white;
    padding: 25px;
    border-radius: var(--pet-id-radius);
    margin-bottom: 20px;
    border: 1px solid var(--pet-id-border);
}

.owner-form-header,
.pet-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
    flex-wrap: wrap;
}

.owner-form-header .owner-title,
.pet-form-header .pet-title {
    margin-bottom: 0;
}

.btn-copy-owner,
.btn-copy-pet {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--pet-id-gray, #888);
    background: transparent;
    border: 1px dashed var(--pet-id-border, #ddd);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--pet-id-transition);
    white-space: nowrap;
}

.btn-copy-owner:hover,
.btn-copy-pet:hover {
    color: var(--pet-id-primary);
    border-color: var(--pet-id-primary);
    border-style: solid;
    background: #fef2f2;
}

.btn-copy-owner.copied,
.btn-copy-pet.copied {
    color: #27ae60;
    border-color: #27ae60;
    border-style: solid;
    background: #f0faf4;
    pointer-events: none;
}

/* Hide copy button on Card #1 (first owner/pet form) */
.owner-form[data-owner="1"] .btn-copy-owner,
.pet-form[data-pet="1"] .btn-copy-pet {
    display: none;
}

.owner-title,
.pet-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pet-id-border);
}

.shipping-address-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 2px solid var(--pet-id-light);
}

.ship-different-wrapper {
    margin-bottom: 15px;
}

.shipping-fields-section {
    margin-top: 20px;
    padding: 20px;
    background: var(--pet-id-light);
    border-radius: var(--pet-id-radius);
    border-left: 4px solid var(--pet-id-primary);
}

.shipping-fields-title {
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 18px;
    color: var(--pet-id-dark);
}

.summary-shipping-section {
    margin: 15px 0;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid var(--pet-id-border);
}

.summary-shipping-title {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 10px;
    color: var(--pet-id-primary);
}

/* ==================== Confirmation Summary ==================== */
.confirmation-summary {
    background: white;
    padding: 25px;
    border-radius: var(--pet-id-radius);
    margin-bottom: 25px;
    border: 1px solid var(--pet-id-border);
}

.summary-card {
    padding: 20px;
    background: var(--pet-id-light);
    border-radius: var(--pet-id-radius);
    margin-bottom: 15px;
}

.summary-card h4 {
    color: var(--pet-id-primary);
    margin-bottom: 15px;
}

.summary-row {
    display: flex;
    padding: 8px 0;
    border-bottom: 1px dashed var(--pet-id-border);
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    flex: 0 0 40%;
    color: var(--pet-id-gray);
}

.summary-value {
    flex: 1;
    font-weight: 500;
}

/* ==================== Order Summary ==================== */
.order-summary {
    background: white;
    padding: 25px;
    border-radius: var(--pet-id-radius);
    border: 1px solid var(--pet-id-border);
}

.order-summary h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--pet-id-dark);
}

.order-items {
    margin-bottom: 20px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--pet-id-border);
}

.order-totals {
    padding-top: 15px;
    border-top: 2px solid var(--pet-id-border);
}

.total-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
}

.total-row.grand-total {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    padding-top: 15px;
    border-top: 2px solid var(--pet-id-primary);
}

/* ==================== Coupon Section ==================== */
.coupon-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--pet-id-light);
    border-radius: var(--pet-id-radius);
}

.coupon-input-wrapper {
    display: flex;
    gap: 10px;
}

.coupon-input-wrapper input {
    flex: 1;
}

.btn-coupon {
    padding: 12px 25px;
    background: var(--pet-id-primary);
    color: white;
    border: none;
    border-radius: var(--pet-id-radius);
    font-weight: 600;
    cursor: pointer;
    transition: var(--pet-id-transition);
}

.btn-coupon:hover {
    background: var(--pet-id-primary-dark);
}

.coupon-message {
    margin-top: 10px;
    font-size: 0.9rem;
}

.coupon-message.success {
    color: var(--pet-id-success);
}

.coupon-message.error {
    color: var(--pet-id-danger);
}

/* ==================== Payment Section ==================== */
.payment-method {
    margin-bottom: 15px;
}

.payment-container {
    width: 100%;
}

.payment-summary {
    background: var(--pet-id-primary);
    color: white;
    padding: 25px;
    border-radius: var(--pet-id-radius);
    margin-bottom: 25px;
    text-align: center;
}

.amount-label {
    font-size: 1rem;
    opacity: 0.9;
}

.amount-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-top: 5px;
}

.payment-method h3 {
    margin-bottom: 15px;
}

.payment-option {
    display: flex;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--pet-id-primary);
    border-radius: var(--pet-id-radius);
    background: rgba(41, 148, 129, 0.05);
}

.payment-icon {
    width: 80px;
    margin-right: 20px;
}

.payment-icon img {
    max-width: 100%;
}

.payment-info strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.payment-info p {
    color: var(--pet-id-gray);
    margin: 0;
    font-size: 0.9rem;
}

.terms-section {
    margin: 25px 0;
}

/* ==================== Free Order Notice ==================== */
.free-order-notice {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 2px solid var(--pet-id-success);
    border-radius: var(--pet-id-radius);
}

.free-order-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.free-order-notice h3 {
    font-size: 1.4rem;
    color: var(--pet-id-success);
    margin-bottom: 10px;
}

.free-order-notice p {
    color: var(--pet-id-dark);
    font-size: 1rem;
    margin: 0;
}

.payment-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px 20px;
    border-radius: var(--pet-id-radius);
    color: #856404;
}

.payment-notice p {
    margin: 0;
}

/* ==================== Navigation Buttons ==================== */
.pet-id-nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--pet-id-border);
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 15px 35px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--pet-id-radius);
    cursor: pointer;
    transition: var(--pet-id-transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-prev {
    background: var(--pet-id-light);
    color: var(--pet-id-dark);
    border: 2px solid var(--pet-id-border);
}

.btn-prev:hover {
    background: var(--pet-id-border);
}

.btn-next {
    background: var(--pet-id-primary);
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    background: var(--pet-id-primary-dark);
}

.btn-submit {
    background: var(--pet-id-highlight);
    color: white;
    margin-left: auto;
}

.btn-submit:hover {
    background: #a91924;
}

.btn-submit:disabled {
    background: var(--pet-id-gray);
    cursor: not-allowed;
}

.btn-loading {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

.btn-submit.loading .btn-loading {
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ==================== Submit Loading Overlay ==================== */
.pet-id-submit-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.submit-overlay-content {
    background: #fff;
    border-radius: 16px;
    padding: 40px 50px;
    text-align: center;
    max-width: 420px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.submit-overlay-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top-color: var(--pet-id-primary, #c0392b);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.submit-overlay-status {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pet-id-dark, #333);
    margin: 0 0 8px;
    line-height: 1.5;
}

.submit-overlay-hint {
    font-size: 0.85rem;
    color: var(--pet-id-gray, #999);
    margin: 0;
}

/* ==================== Preview Area ==================== */
.preview-sticky {
    position: sticky;
    top: 50px;
    /* 32px admin bar + 18px spacing */
    max-height: calc(100vh - 60px);
    overflow-y: auto;
}

.preview-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    margin-bottom: 20px;
    text-align: center;
}

.preview-card-selector {
    margin-bottom: 20px;
    text-align: center;
}

.preview-card-selector select {
    padding: 8px 15px;
    border-radius: var(--pet-id-radius);
}

/* ==================== Card Preview ==================== */
.preview-card {
    margin-bottom: 20px;
}

/* Download Card Button */
.preview-download-wrap {
    text-align: center;
    margin-bottom: 20px;
}

.btn-download-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: linear-gradient(135deg, var(--pet-id-highlight) 0%, #a91924 100%);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(206, 32, 46, 0.3);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    animation: btn-pulse 2s infinite;
}

/* Shine overlay effect */
.btn-download-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -120%;
    width: 60%;
    height: 200%;
    background: rgba(255, 255, 255, 0.25);
    transform: rotate(35deg);
    transition: none;
    pointer-events: none;
}

.btn-download-card:hover {
    background: linear-gradient(135deg, #e02434 0%, var(--pet-id-highlight) 100%);
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 8px 25px rgba(206, 32, 46, 0.4);
}

.btn-download-card:hover::after {
    left: 150%;
    transition: all 0.75s ease;
}

.btn-download-card:active {
    transform: translateY(-1px) scale(1);
}

.btn-download-card:disabled {
    opacity: 0.7;
    cursor: wait;
    animation: none;
    transform: none;
}


@keyframes btn-pulse {
    0% {
        box-shadow: 0 4px 15px rgba(206, 32, 46, 0.3);
    }

    50% {
        box-shadow: 0 4px 25px rgba(206, 32, 46, 0.6);
    }

    100% {
        box-shadow: 0 4px 15px rgba(206, 32, 46, 0.3);
    }
}


.btn-download-card svg {
    flex-shrink: 0;
}

.btn-download-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

.card-label {
    text-align: center;
    font-size: 0.85rem;
    color: var(--pet-id-gray);
    margin-bottom: 10px;
}

.card-content {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 10px;
    padding: 15px;
    box-shadow: var(--pet-id-shadow);
    font-size: 0.75rem;
    min-height: 200px;
}

#card-front .card-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#card-front .card-logo img {
    height: 30px;
    margin-right: 10px;
}

#card-front .card-fund-text {
    font-size: 0.65rem;
    color: var(--pet-id-primary-dark);
}

#card-front .card-body {
    display: flex;
    gap: 15px;
}

#card-front .card-photo {
    flex: 0 0 80px;
}

.photo-placeholder {
    width: 80px;
    height: 100px;
    background: white;
    border: 2px dashed var(--pet-id-border);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    color: var(--pet-id-gray);
    text-align: center;
    overflow: hidden;
}

.photo-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#card-front .card-info {
    flex: 1;
}

#card-front .card-id {
    font-size: 0.7rem;
    margin-bottom: 5px;
}

#card-front .card-title-main {
    font-weight: 700;
    color: var(--pet-id-primary);
    font-size: 0.85rem;
}

#card-front .card-title-sub {
    font-size: 0.65rem;
    color: var(--pet-id-gray);
    margin-bottom: 8px;
}

#card-front .info-row {
    display: flex;
    margin-bottom: 3px;
    line-height: 1.4;
}

#card-front .info-label {
    flex: 0 0 85px;
    font-size: 0.65rem;
    color: var(--pet-id-gray);
}

#card-front .info-value {
    font-weight: 500;
    font-size: 0.7rem;
}

#card-front .footer-info {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px dashed rgba(0, 0, 0, 0.1);
}

/* Card Back */
#card-back {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    font-size: 0.65rem;
}

.card-back-header {
    text-align: center;
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.sponsor-logos {
    color: var(--pet-id-gray);
    font-size: 0.6rem;
}

.card-back-body h4 {
    font-size: 0.75rem;
    color: var(--pet-id-primary);
    margin-bottom: 8px;
}

.card-back-body ul {
    padding-left: 15px;
    margin: 0 0 10px 0;
}

.card-back-body li {
    margin-bottom: 5px;
    line-height: 1.4;
}

.card-back-contact {
    background: rgba(255, 255, 255, 0.5);
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.card-back-contact p {
    margin: 3px 0;
}

/* ==================== Benefits Section ==================== */
.pet-id-benefits {
    padding: 60px 20px;
    background: white;
}

.benefits-container {
    max-width: 1200px;
    margin: 0 auto;
}

.benefits-title {
    text-align: center;
    font-size: 1.8rem;
    color: var(--pet-id-primary);
    margin-bottom: 40px;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.benefit-item {
    text-align: center;
    padding: 30px 20px;
    border-radius: var(--pet-id-radius);
    background: var(--pet-id-light);
    transition: var(--pet-id-transition);
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--pet-id-shadow);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.benefit-item h3 {
    font-size: 1.1rem;
    color: var(--pet-id-primary);
    margin-bottom: 10px;
}

.benefit-item p {
    color: var(--pet-id-gray);
    font-size: 0.9rem;
    margin: 0;
}

/* ==================== Notices ==================== */
.pet-id-notice {
    padding: 20px;
    border-radius: var(--pet-id-radius);
    margin-bottom: 20px;
}

.pet-id-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.pet-id-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

/* ==================== Validation Errors ==================== */
label.error {
    color: var(--pet-id-danger);
    font-size: 0.85rem;
    font-weight: normal;
    margin-top: 5px;
    display: block;
}

/* ==================== Price Summary in Steps (2 & 3) ==================== */
.price-summary-container {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px dashed var(--pet-id-border);
}

.price-summary {
    background: white;
    border: 1px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    padding: 20px 25px;
    max-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.price-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.price-summary-row:last-child {
    margin-bottom: 0;
}

.price-summary-row .price-label {
    color: var(--pet-id-gray);
    font-size: 0.95rem;
}

.price-summary-row .price-value {
    font-weight: 600;
    color: var(--pet-id-dark);
}

.price-summary-row.total .price-label {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--pet-id-primary);
}

.price-summary-row.total .price-value {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--pet-id-primary);
}

.price-summary-extra-items {
    margin-top: 10px;
}

.price-summary-extra-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--pet-id-gray);
}

.price-summary-divider {
    height: 1px;
    background: var(--pet-id-border);
    margin: 15px 0;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 1200px) {
    .pet-id-form-area {
        flex: 0 0 60%;
        max-width: 60%;
    }

    .pet-id-preview-area {
        flex: 0 0 40%;
        max-width: 40%;
    }
}

@media (max-width: 992px) {
    .pet-id-row {
        flex-direction: column;
    }

    .pet-id-form-area,
    .pet-id-preview-area {
        flex: 0 0 100%;
        max-width: 100%;
        border-right: none;
    }

    .pet-id-preview-area {
        border-top: 1px solid var(--pet-id-border);
    }

    .preview-sticky {
        position: static;
    }

    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pet-id-progress {
        padding: 0;
    }

    .step-title {
        display: none;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 20px;
        width: 100%;
    }

    .form-row-3 .form-group {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }

    .size-options {
        flex-direction: column;
    }

    .pet-id-nav-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .btn-next,
    .btn-submit {
        margin-left: 0;
    }

    .coupon-input-wrapper {
        flex-direction: column;
    }

    .btn-coupon {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .pet-id-hero {
        padding: 50px 15px;
    }

    .pet-id-main {
        padding: 20px 15px;
    }

    .pet-id-form-area,
    .pet-id-preview-area {
        padding: 20px 15px;
    }

    .form-section {
        padding: 15px;
    }

    .owner-form,
    .pet-form {
        padding: 15px;
    }

    .benefits-grid {
        grid-template-columns: 1fr;
    }

    .step-number {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .progress-line {
        margin: 0 5px;
    }
}

/* ==================== Sponsor Fanpage Section ==================== */
.sponsor-fanpage-section {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border: 1px solid #ffcc80;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.sponsor-fanpage-section h3 {
    font-size: 1.1rem;
    color: #e65100;
    margin-bottom: 8px;
}

.sponsor-desc {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
}

.sponsor-link-btn {
    display: inline-block;
    background: #1877f2;
    color: #fff !important;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.sponsor-link-btn:hover {
    background: #1565c0;
}

.sponsor-checkbox-disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== First-Time Notice ==================== */
.first-time-notice {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 1px solid #81c784;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.first-time-text {
    color: #2e7d32;
    font-weight: 600;
    font-size: 0.95rem;
    margin: 0;
}

.first-time-phone-warning {
    margin-top: 8px;
    margin-bottom: 0;
    padding: 8px 10px;
    background: #fff3e0;
    border: 1px solid #ffcc80;
    border-radius: 8px;
    color: #e65100;
    font-size: 0.86rem;
    line-height: 1.35;
}

/* ==================== Banner Section ==================== */
.pet-id-banner-section {
    margin-bottom: 20px;
    text-align: center;
}

.pet-id-banner-section img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

/* ==================== QA Questions Section ==================== */
.pet-id-qa-section {
    background: white;
    border-radius: var(--pet-id-radius);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--pet-id-border);
}

.pet-id-qa-section h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--pet-id-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--pet-id-border);
}

.qa-question {
    margin-bottom: 20px;
    padding: 16px 18px;
    background: var(--pet-id-light);
    border-radius: var(--pet-id-radius);
    border: 1px solid transparent;
    transition: var(--pet-id-transition);
}

.qa-question:last-child {
    margin-bottom: 0;
}

.qa-question label.qa-title {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.92rem;
    color: var(--pet-id-dark);
    line-height: 1.5;
}

.qa-question .qa-options {
    padding-left: 4px;
}

.qa-question .qa-options label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
    font-size: 0.88rem;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s ease;
    line-height: 1.45;
    color: var(--pet-id-dark);
}

.qa-question .qa-options label:last-child {
    margin-bottom: 0;
}

.qa-question .qa-options label:hover {
    background: rgba(41, 148, 129, 0.06);
}

.qa-question .qa-options input[type="radio"] {
    margin-right: 0;
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: var(--pet-id-primary);
}

/* QA Required & Error States */
.qa-question .qa-title .required {
    color: var(--pet-id-highlight);
    margin-left: 2px;
}

.qa-question.qa-error {
    background: rgba(220, 53, 69, 0.05);
    border-color: var(--pet-id-danger);
}

.qa-question.qa-error .qa-title {
    color: var(--pet-id-danger);
}

/* QA Option with Share Link */
.qa-option-with-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    line-height: 1.5;
}

.qa-share-url {
    color: var(--pet-id-primary);
    word-break: break-all;
    text-decoration: none;
    font-size: 0.84rem;
    font-weight: 500;
    background: rgba(41, 148, 129, 0.08);
    padding: 2px 8px;
    border-radius: 4px;
    border-bottom: 1px dashed var(--pet-id-primary);
    transition: all 0.2s ease;
}

.qa-share-url:hover {
    background: rgba(41, 148, 129, 0.15);
    border-bottom-style: solid;
}

.btn-copy-share-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 14px;
    border: none;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--pet-id-primary), #1e8c6e);
    color: #fff;
    font-size: 0.76rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(41, 148, 129, 0.3);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.btn-copy-share-link svg {
    transition: transform 0.2s ease;
}

.btn-copy-share-link:hover {
    background: linear-gradient(135deg, #1e8c6e, #16705a);
    box-shadow: 0 4px 14px rgba(41, 148, 129, 0.4);
    transform: translateY(-1px);
}

.btn-copy-share-link:hover svg {
    transform: scale(1.15);
}

.btn-copy-share-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(41, 148, 129, 0.3);
}

.btn-copy-share-link.copied {
    background: linear-gradient(135deg, #43a047, #2e7d32);
    box-shadow: 0 2px 10px rgba(46, 125, 50, 0.35);
    pointer-events: none;
    animation: copyPulse 0.3s ease;
}

@keyframes copyPulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }

    100% {
        transform: scale(1);
    }
}

.qa-error-message {
    display: block;
    color: var(--pet-id-danger);
    font-size: 0.82rem;
    font-weight: normal;
    margin-top: 8px;
    padding-left: 4px;
}

/* ==================== Necklace Review in Step 4 ==================== */
.summary-necklace-review {
    margin-top: 10px;
    padding: 12px;
    background: #f0f8ff;
    border-radius: 8px;
    border: 1px solid #d0e8ff;
}

.necklace-preview-image {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
}

.necklace-preview-image img {
    width: 80px;
    height: auto;
    border-radius: 6px;
    border: 1px solid #ccc;
    object-fit: contain;
}

.necklace-preview-caption {
    font-size: 0.85rem;
    color: #555;
    font-style: italic;
}

/* ==================== Per-Pet Necklace Option (Step 3) ==================== */
.necklace-option-section {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px dashed var(--pet-id-border);
}

.necklace-checkbox {
    margin-bottom: 0;
}

.necklace-checkbox .checkbox-label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;
}

.necklace-price-tag {
    display: inline-block;
    background: var(--pet-id-primary);
    color: white;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 12px;
    margin-left: 5px;
}

.necklace-size-options {
    margin-top: 15px;
    padding: 20px;
    background: rgba(41, 148, 129, 0.05);
    border-radius: var(--pet-id-radius);
    border: 1px solid rgba(41, 148, 129, 0.2);
}

.necklace-desc {
    font-size: 0.9rem;
    color: var(--pet-id-gray);
    margin-bottom: 15px;
}

.size-radio-group {
    display: flex;
    gap: 15px;
}

.size-radio-option {
    cursor: pointer;
    flex: 1;
}

.size-radio-option input[type="radio"] {
    display: none;
}

.size-radio-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 20px;
    border: 2px solid var(--pet-id-border);
    border-radius: var(--pet-id-radius);
    background: white;
    text-align: center;
    transition: var(--pet-id-transition);
}

.size-radio-option:hover .size-radio-card {
    border-color: var(--pet-id-primary);
}

.size-radio-option input[type="radio"]:checked+.size-radio-card {
    border-color: var(--pet-id-primary);
    background: rgba(41, 148, 129, 0.1);
    box-shadow: 0 0 0 3px rgba(41, 148, 129, 0.15);
}

.size-radio-name {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    color: var(--pet-id-primary);
    margin-bottom: 4px;
}

.size-radio-dimension {
    font-size: 0.8rem;
    color: var(--pet-id-gray);
}

/* ==================== Necklace Illustration Inline ==================== */
.necklace-illustration-inline {
    margin-bottom: 15px;
}

.necklace-illustration-inline img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.necklace-illustration-caption {
    text-align: center;
    font-size: 0.82rem;
    color: var(--pet-id-gray);
    margin: 10px 0 0;
    font-style: italic;
}

/* Validation error for necklace size */
.necklace-size-options label.error {
    display: block;
    text-align: center;
    margin-top: 10px;
}

/* Responsive adjustments for necklace options */
@media (max-width: 576px) {
    .necklace-checkbox .checkbox-label {
        flex-direction: column;
        align-items: flex-start;
    }

    .necklace-price-tag {
        margin-left: 0;
        margin-top: 5px;
    }

    .size-radio-group {
        flex-direction: column;
    }

    .size-radio-card {
        padding: 12px 15px;
    }
}

/* Form note style */
.form-note {
    padding: 15px 20px;
    background: #e3f2fd;
    border-radius: var(--pet-id-radius);
    border-left: 4px solid var(--pet-id-primary);
    color: var(--pet-id-dark);
    font-size: 0.9rem;
    margin-top: 20px;
}

/* ==================== Card Front Overlay Preview ==================== */
.card-front-overlay {
    position: relative;
    width: 100%;
    padding-bottom: 63.5%;
    /* TÃ¡Â»â€° lÃ¡Â»â€¡ ~900:550 cÃ¡Â»Â§a hÃƒÂ¬nh template */
    background-image: url('../../images/petid-mattruoc.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--pet-id-shadow);
}

/* Base overlay text style */
.overlay-text {
    position: absolute;
    font-family: 'Arial', sans-serif;
    font-weight: 600;
    color: #2d3748;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.55em !important;
    line-height: 1.5;
    text-transform: uppercase;
}

/* Pet Photo Overlay */
.overlay-pet-photo {
    position: absolute;
    top: 30.5%;
    left: 3%;
    width: 26.5%;
    height: 56%;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.overlay-pet-photo .photo-placeholder-text {
    font-size: 0.5em;
    color: var(--pet-id-gray);
    text-align: center;
}

.overlay-pet-photo img {
    width: 92%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

/* ID Field - GÃƒÂ³c trÃƒÂªn trÃƒÂ¡i */
.overlay-id {
    top: 23%;
    left: 10%;
    font-size: 1.1em !important;
    font-weight: 700;
    color: #1a365d;
}

/* Pet Name - Sau "TÃƒÂªn ThÃƒÂº cÃ†Â°ng:" */
.overlay-pet-name {
    top: 38%;
    left: 50%;
    max-width: 48%;
    font-size: 0.55em;
}

/* Pet Type - Sau "LoÃ¡ÂºÂ¡i ThÃƒÂº cÃ†Â°ng:" */
.overlay-pet-type {
    top: 46%;
    left: 50.5%;
    max-width: 28%;
    font-size: 0.55em;
}

/* Pet Breed - Sau "GiÃ¡Â»â€˜ng ThÃƒÂº cÃ†Â°ng:" */
.overlay-pet-breed {
    top: 54.5%;
    left: 52.5%;
    max-width: 28%;
    font-size: 0.55em;
}

/* Birthday - Sau "NÃ„Æ’m sinh:" */
.overlay-birthday {
    top: 62%;
    left: 45.5%;
    max-width: 28%;
    font-size: 0.55em;
}

/* Features - Sau "Ã„ÂÃ¡ÂºÂ·c Ã„â€˜iÃ¡Â»Æ’m:" */
.overlay-features {
    top: 70%;
    left: 45%;
    max-width: 50%;
    font-size: 0.55em;
}

/* Owner Name - Sau "TÃƒÂªn ChÃ¡Â»Â§ nuÃƒÂ´i:" */
.overlay-owner-name {
    top: 78%;
    left: 50%;
    max-width: 48%;
    font-size: 0.55em;
}

/* Address - Sau "Ã„ÂÃ¡Â»â€¹a chÃ¡Â»â€°:" */
.overlay-address {
    top: 86%;
    left: 43%;
    max-width: 55%;
    font-size: 0.55em;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.3;
    overflow: hidden;
}

/* Gender - CÃ¡Â»â„¢t riÃƒÂªng bÃƒÂªn phÃ¡ÂºÂ£i, sau "GiÃ¡Â»â€ºi tÃƒÂ­nh:" */
.overlay-gender {
    top: 61.5%;
    left: 77%;
    max-width: 20%;
    font-size: 0.55em;
}

/* ==================== Card Back Image ==================== */
.card-back-image {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--pet-id-shadow);
}

.card-back-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* ==================== Card Back Overlay (bulk download) ==================== */
.card-back-overlay {
    position: relative;
    width: 100%;
    padding-bottom: 63.5%;
    background-image: url('../../images/petid-matsau.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--pet-id-shadow);
}

.overlay-qrcode {
    position: absolute;
    top: 50%;
    right: 5%;
    width: 19%;
    height: auto;
    object-fit: contain;
}

/* ==================== Responsive adjustments for overlay ==================== */
@media (max-width: 1200px) {
    .overlay-text {
        font-size: 0.5em;
    }
}

@media (max-width: 992px) {
    .card-front-overlay {
        /* Khi preview area chiÃ¡ÂºÂ¿m full width, cÃƒÂ³ thÃ¡Â»Æ’ phÃƒÂ³ng to hÃ†Â¡n */
        max-width: 500px;
        margin: 0 auto;
    }

    .overlay-text {
        font-size: 0.65em;
    }

    .overlay-pet-photo .photo-placeholder-text {
        font-size: 0.6em;
    }

    .card-back-image {
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .overlay-text {
        font-size: 0.5em;
    }
}

/* ==================== Emergency Contact Section ==================== */
.emergency-contact-section {
    margin-top: 25px;
    padding-top: 0;
    border-top: none;
}

.emergency-contact-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    background: var(--pet-id-primary, #299481);
    padding: 10px 16px;
    border-radius: var(--pet-id-radius, 8px) var(--pet-id-radius, 8px) 0 0;
    margin: 0 -20px 20px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.emergency-contact-section .form-row {
    margin-top: 0;
}

/* Confirmation Summary - Emergency Contact */
.summary-emergency-section {
    margin-top: 10px;
    padding: 12px 15px;
    background: rgba(41, 148, 129, 0.06);
    border-radius: 8px;
    border-left: 3px solid var(--pet-id-primary, #299481);
}

.summary-emergency-title {
    display: block;
    font-size: 0.9rem;
    color: var(--pet-id-primary, #299481);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Terms Section Margin */
.terms-section {
    margin-top: 25px;
    padding: 10px 0;
}

/* ==================== Sponsor Fanpage Proof Upload ==================== */
#sponsor-proof-upload-wrapper {
    margin-top: 15px;
    padding: 16px;
    background: rgba(41, 148, 129, 0.04);
    border: 1px dashed var(--pet-id-primary, #299481);
    border-radius: var(--pet-id-radius, 8px);
}

.sponsor-proof-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--pet-id-dark, #333);
    margin-bottom: 6px;
    display: block;
}

.sponsor-proof-desc {
    font-size: 0.85rem;
    color: var(--pet-id-gray, #6c757d);
    margin-bottom: 12px;
    margin-top: 0;
}

/* Override: sponsor proof input KHÔNG ẩn như pet photo input */
#sponsor_like_proof.file-input,
.sponsor-proof-input.file-input {
    position: relative;
    opacity: 1;
    width: auto;
    height: auto;
    display: block;
    padding: 10px;
    border: 2px solid var(--pet-id-border, #dee2e6);
    border-radius: var(--pet-id-radius, 8px);
    background: white;
    font-size: 0.9rem;
    margin-bottom: 10px;
    cursor: pointer;
}

/* Ẩn label file khi dùng với sponsor proof (vì input đã hiển thị native) */
#sponsor-proof-file-wrapper .file-label {
    display: none;
}

/* Preview ảnh xác thực */
#sponsor_proof_preview img {
    max-width: 200px;
    max-height: 160px;
    border-radius: var(--pet-id-radius, 8px);
    border: 2px solid var(--pet-id-primary, #299481);
    box-shadow: var(--pet-id-shadow, 0 2px 10px rgba(0, 0, 0, 0.1));
    display: block;
    margin-top: 8px;
}

/* ==================== Delivery Method Section ==================== */
.delivery-method-section {
    margin-bottom: 24px;
    border: 1px solid var(--pet-id-border, #dee2e6);
    border-radius: var(--pet-id-radius, 8px);
    overflow: hidden;
}

.delivery-method-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--pet-id-primary, #299481);
    margin: 0;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--pet-id-border, #dee2e6);
}

/* Radio option list */
.delivery-method-options {
    padding: 8px 12px 12px;
}

.delivery-method-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 10px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    font-weight: normal;
    margin-bottom: 0;
}

.delivery-method-option:hover {
    background: rgba(41, 148, 129, 0.06);
}

/* Ẩn native radio */
.delivery-method-radio {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio mark */
.delivery-radio-mark {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid var(--pet-id-border, #dee2e6);
    background: white;
    margin-top: 2px;
    transition: border-color 0.2s, background 0.2s;
    position: relative;
}

.delivery-radio-mark::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--pet-id-primary, #299481);
    transition: transform 0.2s;
}

.delivery-method-radio:checked~.delivery-radio-mark {
    border-color: var(--pet-id-primary, #299481);
}

.delivery-method-radio:checked~.delivery-radio-mark::after {
    transform: translate(-50%, -50%) scale(1);
}

.delivery-option-text {
    font-size: 0.9rem;
    color: var(--pet-id-dark, #333);
    line-height: 1.5;
}

.delivery-option-text a {
    color: var(--pet-id-primary, #299481);
    text-decoration: none;
    font-weight: 600;
}

.delivery-option-text a:hover {
    text-decoration: underline;
}

/* Option selected state */
.delivery-method-option:has(.delivery-method-radio:checked) {
    background: rgba(41, 148, 129, 0.08);
}

/* Home Delivery option highlight */
.delivery-method-option--highlight .delivery-option-text {
    color: var(--pet-id-dark, #333);
}

/* Error message */
.delivery-method-error {
    padding: 0 20px 12px;
}

.delivery-method-error .error {
    font-size: 0.875rem;
    color: var(--pet-id-danger, #dc3545);
    font-weight: normal;
}

/* ==================== Home Delivery Form ==================== */
.home-delivery-section {
    background: #f0faf7;
    border-top: 1px solid #c3e6dc;
    padding: 20px;
}

.home-delivery-note {
    font-size: 0.875rem;
    color: #2e6b55;
    font-style: italic;
    margin-bottom: 16px;
    line-height: 1.6;
}

.home-delivery-note a {
    color: var(--pet-id-primary, #299481);
    text-decoration: underline;
    word-break: break-all;
}

.delivery-contact-title {
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--pet-id-primary, #299481);
    text-transform: uppercase;
    margin-bottom: 10px;
    margin-top: 0;
}

.delivery-contact-note {
    font-size: 0.85rem;
    color: var(--pet-id-dark, #333);
    margin-bottom: 18px;
    line-height: 1.6;
}

.delivery-address-hint {
    font-size: 1rem;
    cursor: help;
    vertical-align: middle;
}

/* Shipping field – dùng chung form-group style, ghi đè nền */
.home-delivery-section .form-group label {
    color: var(--pet-id-primary, #299481);
    font-weight: 600;
}

.home-delivery-section input.shipping-field {
    background: white;
    border-color: #a8d5c8;
}

.home-delivery-section input.shipping-field:focus {
    border-color: var(--pet-id-primary, #299481);
    box-shadow: 0 0 0 3px rgba(41, 148, 129, 0.15);
}

.home-delivery-section input.shipping-field.error {
    border-color: var(--pet-id-danger, #dc3545);
}

/* ==================== Responsive: Delivery Section ==================== */
@media (max-width: 600px) {
    .delivery-method-option {
        padding: 8px 6px;
    }

    .delivery-option-text {
        font-size: 0.85rem;
    }

    .home-delivery-section {
        padding: 16px;
    }
}
/* ==================== Zalo Note Styling ==================== */
.zalo-note {
    background-color: #f0f7f6; /* Very light version of primary green */
    border: 1px solid #cce3df;
    border-left: 4px solid var(--pet-id-primary);
    border-radius: var(--pet-id-radius);
    padding: 15px 20px;
    margin-top: 15px;
    width: 100%;
    box-sizing: border-box;
}

.zalo-note-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 500;
    color: var(--pet-id-dark);
    margin-bottom: 0;
}

.zalo-phone {
    font-size: 1.1rem;
    color: var(--pet-id-primary);
    background: white;
    padding: 2px 10px;
    border-radius: 4px;
    border: 1px solid #cce3df;
    font-family: monospace;
    letter-spacing: 0.5px;
}

.btn-copy-zalo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: white;
    border: 1px solid var(--pet-id-border);
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--pet-id-gray);
    cursor: pointer;
    transition: var(--pet-id-transition);
}

.btn-copy-zalo:hover {
    border-color: var(--pet-id-primary);
    color: var(--pet-id-primary);
    background: #f0f7f6;
    transform: translateY(-1px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.btn-copy-zalo:active {
    transform: translateY(0);
}

.btn-copy-zalo svg {
    flex-shrink: 0;
}

.btn-copy-zalo.copied {
    background: var(--pet-id-primary);
    color: white;
    border-color: var(--pet-id-primary);
}

.zalo-note-desc {
    margin-top: 8px;
    font-size: 0.88rem;
    color: var(--pet-id-gray);
    line-height: 1.5;
}

/* ==================== Responsive: Delivery Section ==================== */
@media (max-width: 600px) {
    .delivery-method-option {
        padding: 8px 6px;
    }

    .delivery-option-text {
        font-size: 0.85rem;
    }

    .home-delivery-section {
        padding: 16px;
    }

    .zalo-note {
        padding: 12px 15px;
    }

    .zalo-note-content {
        gap: 8px;
    }

    .zalo-phone {
        font-size: 1rem;
    }
}

/* QA Question Title Link Style */
.qa-question label.qa-title a {
    color: #228f75;
    text-decoration: underline;
}
