/* Price Family Orthodontics Virtual Consultation Styles */

:root {
    --primary-blue: #2c5aa0;
    --secondary-blue: #4a7bc8;
    --light-blue: #e8f2ff;
    --accent-blue: #1e4080;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
    --success-green: #28a745;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Raleway', sans-serif; /* Original: 'Open Sans' */
    line-height: 1.6;
    color: var(--dark-gray);
    background: url('../assets/images/background-tile.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 30px;
    padding: 10px 20px;
    background: #385ea6;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    color: white;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.logo-image {
    height: 240px;
    width: auto;
}

.logo-text h1 {
    color: white;
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.tagline {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    font-weight: 300;
    font-style: italic;
}

/* Progress Bar Styles */
.progress-container {
    margin-bottom: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border-color);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    width: 14.28%;
    transition: var(--transition);
    border-radius: 3px;
}

.step-indicators {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.step {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
}

.step.active {
    background: var(--primary-blue);
    color: var(--white);
    transform: scale(1.1);
}

.step.completed {
    background: var(--success-green);
    color: var(--white);
}

/* Form Container */
.form-container {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-step {
    display: none;
    padding: 40px;
    min-height: 500px;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.step-content {
    max-width: 600px;
    margin: 0 auto;
}

.step-content h2 {
    color: var(--primary-blue);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-align: center;
}

.step-content p {
    color: var(--medium-gray);
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 30px;
}

.welcome-text {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

/* Form Elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    color: var(--dark-gray);
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

/* Custom dropdown arrow for select elements */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c5aa0' 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: 20px;
    padding-right: 40px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 12px 30px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
}

.btn-secondary {
    background: var(--light-gray);
    color: var(--dark-gray);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--border-color);
    transform: translateY(-1px);
}

/* Form Navigation */
.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
}

.form-navigation .btn-primary {
    margin-left: auto;
}

/* Photo Instructions */
.video-placeholder {
    margin: 30px 0;
    text-align: center;
}

.video-container {
    background: var(--light-gray);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 40px;
    color: var(--medium-gray);
}

.video-note {
    font-size: 0.9rem;
    margin-top: 10px;
}

.photo-tips {
    background: var(--light-blue);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
}

.photo-tips h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.photo-tips ul {
    list-style: none;
    padding: 0;
}

.photo-tips li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: var(--dark-gray);
}

.photo-tips li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

/* Photo Upload Grid */
.photo-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.upload-item {
    text-align: center;
}

.upload-item label {
    display: block;
    color: var(--dark-gray);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.upload-box {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    background: var(--light-gray);
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.upload-box.with-example {
    background-size: contain;
    background-position: center;
}

.upload-box.with-example::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: var(--border-radius);
    pointer-events: none;
    transition: var(--transition);
}

.upload-box:hover {
    border-color: var(--primary-blue);
    transform: scale(1.2);
}

.upload-box.with-example:hover {
    background-color: transparent;
}

.upload-box.with-example:hover::before {
    background: rgba(255, 255, 255, 0.1);
}

.upload-box input[type="file"] {
    display: none;
}

.upload-placeholder {
    color: var(--dark-gray);
    font-size: 0.9rem;
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.3);
    padding: 10px 15px;
    border-radius: 8px;
    font-weight: 700;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-placeholder.has-image {
    padding: 0;
}

.upload-placeholder img {
    max-width: 100%;
    max-height: 120px;
    border-radius: 4px;
    object-fit: cover;
}

/* Bite Selection */
.bite-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.bite-option {
    text-align: center;
}

.bite-option input[type="radio"] {
    display: none;
}

.bite-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    background: var(--white);
}

.bite-option label:hover {
    border-color: var(--primary-blue);
    background: var(--light-blue);
}

.bite-option input[type="radio"]:checked + label {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

.bite-image {
    font-size: 2rem;
    margin-bottom: 10px;
}

.bite-option span {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
}

/* Privacy Agreement */
.privacy-agreement {
    margin: 30px 0;
    padding: 20px;
    background: var(--light-blue);
    border-radius: var(--border-radius);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1.5;
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    margin-top: 2px;
    flex-shrink: 0;
    transition: var(--transition);
    background: var(--white);
    position: relative;
}

.checkbox-container input[type="checkbox"]:checked + .checkmark {
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.checkbox-container input[type="checkbox"]:checked + .checkmark:after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 12px;
    font-weight: bold;
}

.privacy-agreement a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
}

.privacy-agreement a:hover {
    text-decoration: underline;
}

.privacy-text {
    display: inline-block;
    line-height: 1.6;
    margin-left: 8px;
    word-wrap: break-word;
    hyphens: auto;
}

/* Confirmation Page */
.confirmation {
    text-align: center;
    padding: 60px 40px;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.confirmation h2 {
    color: var(--success-green);
    margin-bottom: 20px;
}

.confirmation p {
    font-size: 1.1rem;
    margin-bottom: 20px;
}

.additional-message {
    font-style: italic;
    color: var(--medium-gray);
    margin-bottom: 40px;
}

.contact-info {
    background: var(--light-blue);
    padding: 25px;
    border-radius: var(--border-radius);
    margin-top: 30px;
}

.contact-info p {
    margin-bottom: 5px;
    color: var(--dark-gray);
}

/* Privacy Policy Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 30px;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 700px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.close {
    color: var(--medium-gray);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: color 0.3s;
}

.close:hover,
.close:focus {
    color: var(--dark-gray);
}

#privacyPolicyContent h2 {
    color: var(--primary-blue);
    margin-bottom: 20px;
    margin-top: 0;
}

#privacyPolicyContent h3 {
    color: var(--secondary-blue);
    margin-top: 20px;
    margin-bottom: 15px;
}

#privacyPolicyContent p {
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: left;
}

#privacyPolicyContent ul,
#privacyPolicyContent ol {
    margin-left: 25px;
    margin-bottom: 15px;
}

#privacyPolicyContent li {
    margin-bottom: 8px;
}

/* Loading States */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.btn-primary.loading {
    background: var(--medium-gray);
    cursor: not-allowed;
}

.btn-primary.loading:after {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--white);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-left: 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Enhanced Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
        max-width: 100%;
    }

    .form-step {
        padding: 25px 15px;
        min-height: auto;
    }

    .logo {
        flex-direction: column;
        gap: 10px;
    }

    .logo-image {
        height: 120px;
    }

    .logo-text h1 {
        font-size: 1.6rem;
        text-align: center;
    }

    .tagline {
        font-size: 0.9rem;
        text-align: center;
    }

    .step-content h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .step-content p {
        font-size: 1rem;
        line-height: 1.5;
    }

    /* Photo Upload Mobile Optimization */
    .photo-upload-grid {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 20px 0;
    }

    .upload-item {
        margin-bottom: 10px;
    }

    .upload-item label {
        font-size: 0.9rem;
        margin-bottom: 8px;
    }

    .upload-box {
        padding: 15px;
        min-height: 120px;
        border-width: 3px;
    }

    .upload-placeholder {
        font-size: 0.85rem;
    }

    /* Improved touch targets for mobile */
    .btn-primary,
    .btn-secondary {
        padding: 14px 25px;
        font-size: 1.1rem;
        min-height: 48px;
        min-width: 48px;
    }

    /* Better form navigation on mobile */
    .form-navigation {
        flex-direction: column;
        gap: 12px;
        margin-top: 25px;
    }

    .form-navigation .btn-primary,
    .form-navigation .btn-secondary {
        width: 100%;
        margin: 0;
    }

    /* Mobile bite selection */
    .bite-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        margin: 20px 0;
    }

    .bite-option label {
        padding: 12px;
        min-height: 100px;
    }

    .bite-image {
        width: 90px;
        height: 60px;
        margin-bottom: 8px;
    }

    .bite-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .bite-option span {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .bite-option small {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    /* Mobile form elements */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Prevents zoom on iOS */
        min-height: 48px;
    }

    .form-group textarea {
        min-height: 120px;
    }

    /* Mobile progress indicators */
    .step-indicators {
        gap: 5px;
        padding: 0 10px;
    }

    .step {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    /* Mobile privacy agreement */
    .privacy-agreement {
        padding: 15px;
        margin: 20px 0;
    }

    .checkbox-container {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .checkmark {
        width: 18px;
        height: 18px;
        margin-right: 10px;
    }

    /* Mobile verification question */
    .verification-question {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .verification-question label {
        min-width: auto;
        font-size: 0.9rem;
    }

    .verification-question select {
        width: 100%;
        max-width: 150px;
        padding: 12px;
        font-size: 1rem;
    }

    /* Mobile bot protection */
    .bot-protection {
        padding: 20px 15px;
        margin: 20px 0;
    }
    .bot-protection h3 {
        font-size: 1.1rem;
    }

    /* Mobile modal improvements */
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
        max-height: 85vh;
    }

    .close {
        font-size: 24px;
        top: 10px;
        right: 15px;
    }

    /* Mobile confirmation page */
    .confirmation {
        padding: 40px 20px;
    }

    .success-icon {
        font-size: 3rem;
    }

    .confirmation h2 {
        font-size: 1.4rem;
        line-height: 1.3;
    }

    .contact-info {
        padding: 20px;
        margin-top: 20px;
    }

    /* Mobile header adjustments */
    .header {
        padding: 15px;
        margin-bottom: 20px;
    }

    .progress-container {
        padding: 15px;
        margin-bottom: 20px;
    }

    /* Better mobile spacing */
    .form-group {
        margin-bottom: 20px;
    }

    .photo-tips {
        padding: 20px 15px;
        margin: 20px 0;
    }

    .photo-tips h3 {
        font-size: 1.1rem;
    }

    .photo-tips li {
        font-size: 0.9rem;
        padding: 6px 0;
        padding-left: 30px;
    }

    /* Mobile video container */
    .video-container {
        padding: 30px 20px;
    }

    /* Enhanced mobile upload preview */
    .upload-placeholder.has-image img {
        max-height: 100px;
    }

    /* Better mobile checkbox styling */
    .checkbox-container input[type="checkbox"]:checked + .checkmark:after {
        font-size: 11px;
    }

    /* Mobile loading states */
    .btn-primary.loading:after {
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    .form-step {
        padding: 20px 10px;
    }

    .logo-image {
        height: 100px;
    }

    .logo-text h1 {
        font-size: 1.4rem;
    }

    .tagline {
        font-size: 0.8rem;
    }

    .step-content h2 {
        font-size: 1.2rem;
    }

    .step-content p {
        font-size: 0.9rem;
    }

    /* Single column bite selection on very small screens */
    .bite-selection {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .bite-option label {
        padding: 10px;
        min-height: 90px;
    }

    .bite-image {
        width: 75px;
        height: 50px;
        margin-bottom: 6px;
    }

    .bite-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

    .bite-option span {
        font-size: 0.85rem;
    }

    .bite-option small {
        font-size: 0.7rem;
    }

    /* Very small screen photo upload */
    .photo-upload-grid {
        gap: 12px;
    }

    .upload-box {
        padding: 12px;
        min-height: 100px;
    }

    .upload-placeholder {
        font-size: 0.8rem;
    }

    /* Extra small buttons */
    .btn-primary,
    .btn-secondary {
        padding: 12px 20px;
        font-size: 1rem;
        min-height: 44px;
    }

    /* Very small step indicators */
    .step {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
    }

    /* Mobile form elements on very small screens */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px;
    }

    /* Mobile privacy text */
    .privacy-text {
        font-size: 0.85rem;
    }

    /* Very small modal */
    .modal-content {
        width: 98%;
        padding: 15px;
        margin: 5% auto;
    }

    /* Mobile confirmation adjustments */
    .confirmation {
        padding: 30px 15px;
    }

    .success-icon {
        font-size: 2.5rem;
    }

    .confirmation h2 {
        font-size: 1.2rem;
    }

    .confirmation p {
        font-size: 0.95rem;
    }
}

/* Camera Integration Mobile Optimizations */
@media (max-width: 768px) and (orientation: portrait) {
    /* Portrait mode optimizations for camera use */
    .photo-upload-grid {
        margin: 15px 0;
    }

    .upload-box {
        position: relative;
    }

    /* Better camera button styling for mobile */
    .upload-box:before {
        content: "📷";
        position: absolute;
        top: 10px;
        right: 10px;
        font-size: 1.5rem;
        opacity: 0.7;
        pointer-events: none;
    }

    /* Enhanced touch feedback */
    .upload-box:active {
        transform: scale(0.98);
        background: rgba(44, 90, 160, 0.1);
    }

    /* Better image preview for mobile */
    .upload-placeholder.has-image {
        position: relative;
    }

    .upload-placeholder.has-image img {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    /* Mobile camera instructions */
    .photo-tips {
        background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
        border-left: 4px solid var(--primary-blue);
    }

    .photo-tips li {
        padding-left: 35px;
    }

    .photo-tips li:before {
        content: "📱";
        position: absolute;
        left: 0;
        font-size: 1rem;
        top: 6px;
    }
}

/* Landscape mode optimizations for tablets */
@media (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .form-step {
        padding: 30px 40px;
    }

    .photo-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .bite-selection {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .logo-image {
        height: 180px;
    }

    .step-content h2 {
        font-size: 1.8rem;
    }
}

/* Large mobile devices (phablets) */
@media (min-width: 576px) and (max-width: 767px) {
    .photo-upload-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .bite-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }

    .form-navigation {
        flex-direction: row;
        gap: 15px;
    }

    .form-navigation .btn-secondary {
        width: auto;
        min-width: 120px;
    }

    .form-navigation .btn-primary {
        margin-left: auto;
        width: auto;
        min-width: 150px;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets for touch devices */
    .btn-primary,
    .btn-secondary {
        min-height: 48px;
        min-width: 48px;
        padding: 14px 24px;
    }

    /* Better button feedback for touch */
    .btn-primary:active,
    .btn-secondary:active {
        transform: scale(0.95);
    }

    /* Enhanced checkbox for touch */
    .checkbox-container {
        min-height: 44px;
        padding: 8px 0;
    }

    .checkmark {
        width: 24px;
        height: 24px;
        margin-right: 12px;
    }

    /* Better radio button touch targets */
    .bite-option label {
        min-height: 48px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }

    /* Enhanced file input touch area */
    .upload-box {
        min-height: 140px;
        position: relative;
    }

    .upload-box input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

    /* Better form input touch targets */
    .form-group input,
    .form-group select,
    .form-group textarea {
        min-height: 48px;
    }

    /* Enhanced modal close button for touch */
    .close {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.1);
        font-size: 20px;
    }

    .close:hover {
        background: rgba(0, 0, 0, 0.2);
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .upload-placeholder img,
    .bite-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* iOS specific optimizations */
@supports (-webkit-touch-callout: none) {
    .form-step {
        -webkit-overflow-scrolling: touch;
    }

    /* iOS form input fixes */
    .form-group input,
    .form-group textarea {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
    
    /* Ensure select dropdown arrow is visible on iOS */
    .form-group select {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232c5aa0' 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: 20px;
        padding-right: 40px;
    }

    /* iOS button fixes */
    .btn-primary,
    .btn-secondary {
        -webkit-appearance: none;
        appearance: none;
        border-radius: 8px;
    }
}

/* Android specific optimizations */
@media screen and (-webkit-min-device-pixel-ratio: 1.5) {
    /* Better text rendering on Android */
    body {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
    }
}


/* Button Centering */
.button-center {
    text-align: center;
    margin: 30px 0;
}

/* Step 1 Background Enhancement */
#step1 {
    background: linear-gradient(rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.95)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23e8f2ff;stop-opacity:1" /><stop offset="100%" style="stop-color:%23ffffff;stop-opacity:1" /></linearGradient></defs><rect width="1000" height="1000" fill="url(%23grad)"/><circle cx="200" cy="200" r="100" fill="%23f0f8ff" opacity="0.3"/><circle cx="800" cy="300" r="150" fill="%23e8f2ff" opacity="0.4"/><circle cx="600" cy="700" r="120" fill="%23f0f8ff" opacity="0.3"/></svg>');
    background-size: cover;
    background-position: center;
    border-radius: var(--border-radius);
}

/* Mobile Responsive Logo */
@media (max-width: 768px) {
    .logo {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-image {
        height: 140px;
    }
    
    .logo-text h1 {
        font-size: 1.8rem;
    }
    
    .tagline {
        font-size: 1rem;
    }
}


/* Enhanced Bite Selection Styles */
.bite-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.bite-option {
    position: relative;
}

.bite-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.bite-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    height: 100%;
}

.bite-option label:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.1);
}

.bite-option input[type="radio"]:checked + label {
    border-color: var(--primary-blue);
    background: var(--light-blue);
    box-shadow: 0 4px 15px rgba(44, 90, 160, 0.2);
}

.bite-image {
    width: 120px;
    height: 80px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: var(--light-gray);
}

.bite-image img {
    width: 70px;
    height: 70px;
    object-fit: contain;
    border-radius: 8px;
}

.question-mark {
    font-size: 2rem;
    color: var(--medium-gray);
}

.bite-option span {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.bite-option small {
    display: block;
    color: var(--medium-gray);
    font-size: 0.9rem;
    line-height: 1.3;
}

/* Bot Protection Styles */
.bot-protection {
    background: var(--light-blue);
    padding: 25px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    border-left: 4px solid var(--primary-blue);
}

.bot-protection h3 {
    color: var(--primary-blue);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.bot-protection p {
    margin-bottom: 15px;
    color: var(--dark-gray);
}

.verification-question {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.verification-question label {
    font-weight: 600;
    color: var(--dark-gray);
    min-width: 120px;
}

.verification-question input {
    width: 100px;
    padding: 10px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    text-align: center;
}

.verification-question input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
}

/* Mobile Responsive Bite Selection */
@media (max-width: 768px) {
    .bite-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .bite-option label {
        padding: 15px 10px;
    }
    
    .bite-image {
        width: 100px;
        height: 65px;
        margin-bottom: 10px;
    }
    
    .bite-image img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }
    
    .bite-option span {
        font-size: 1rem;
    }
    
    .bite-option small {
        font-size: 0.8rem;
    }
    
    .verification-question {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .verification-question label {
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .bite-selection {
        grid-template-columns: 1fr;
    }
}


/* Enhanced Upload Preview Styles */
.upload-placeholder.has-image {
    padding: 0;
    border: 2px solid var(--primary-blue);
    background: var(--white);
}

.upload-placeholder.has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.upload-placeholder.has-image:hover {
    border-color: var(--secondary-blue);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.2);
}

/* Notification Styles */
.notification {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Form Data Restoration Indicator */
.form-restored {
    background: linear-gradient(135deg, #e8f5e8 0%, #f0f9ff 100%);
    border-left: 4px solid #4caf50;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #2e7d32;
}

.form-restored::before {
    content: "💾 ";
    margin-right: 8px;
}


/* Image Hover Modal Styles */
.image-hover-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    pointer-events: none;
}

.image-hover-modal img {
    max-width: 400px;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: white;
    padding: 20px;
}

/* Enhanced Bite Selection Styles */
.bite-selection {
    display: grid;
    grid-template-columns: repeat(3, minmax(200px, 240px));
    gap: 20px;
    margin: 30px 0;
    justify-content: center;
}

.bite-option {
    position: relative;
}

.bite-option input[type="radio"] {
    display: none;
}

.bite-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    height: 100%;
}

.bite-option label:hover {
    border-color: var(--primary-blue);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.15);
    transform: translateY(-2px);
}

.bite-option input[type="radio"]:checked + label {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, #f8fbff 0%, #e3f2fd 100%);
    box-shadow: 0 4px 16px rgba(44, 90, 160, 0.2);
}

.bite-image {
    width: 180px;
    height: 120px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #f8f9fa;
    position: relative;
    overflow: hidden;
}

.bite-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.bite-image img:hover {
    transform: scale(1.05);
}

.bite-option span {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.bite-option small {
    display: block;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

.question-mark {
    font-size: 48px;
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bite-selection {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .bite-image {
        width: 150px;
        height: 100px;
    }
    
    .bite-option label {
        padding: 15px;
    }
    
    .image-hover-modal img {
        max-width: 90vw;
        max-height: 90vh;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .bite-selection {
        grid-template-columns: 1fr;
    }
    
    .bite-image {
        width: 120px;
        height: 80px;
    }
}



/* Camera Button Styles for Mobile */
.camera-button {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(44, 90, 160, 0.9);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(44, 90, 160, 0.3);
}

.camera-button:hover {
    background: rgba(44, 90, 160, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(44, 90, 160, 0.4);
}

.camera-button:active {
    transform: scale(0.95);
}

/* Camera Modal Styles */
.camera-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10001;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    animation: fadeInCamera 0.3s ease-out;
}

@keyframes fadeInCamera {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.camera-modal video {
    max-width: 90vw;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    background: #000;
}

.camera-controls {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 20px;
    align-items: center;
}

.capture-btn {
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 50%;
    width: 70px;
    height: 70px;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.capture-btn:hover {
    background: #45a049;
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(76, 175, 80, 0.5);
}

.capture-btn:active {
    transform: scale(0.95);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4), 0 0 0 0 rgba(76, 175, 80, 0.7);
    }
    70% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4), 0 0 0 10px rgba(76, 175, 80, 0);
    }
    100% {
        box-shadow: 0 4px 20px rgba(76, 175, 80, 0.4), 0 0 0 0 rgba(76, 175, 80, 0);
    }
}

.cancel-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(244, 67, 54, 0.3);
}

.cancel-btn:hover {
    background: #d32f2f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.4);
}

.cancel-btn:active {
    transform: scale(0.95);
}

/* Mobile Camera Instructions */
.mobile-camera-tip {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    padding: 12px;
    border-radius: 8px;
    margin: 10px 0;
    border-left: 4px solid #2196f3;
    font-size: 0.9rem;
    line-height: 1.4;
}

.mobile-camera-tip strong {
    color: #1976d2;
    display: block;
    margin-bottom: 4px;
}

/* Enhanced Upload Box for Mobile Camera */
.upload-box {
    position: relative;
    transition: all 0.3s ease;
}

.upload-box:before {
    content: "📷";
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 1.5rem;
    opacity: 0.7;
    pointer-events: none;
    z-index: 5;
}

.upload-box:hover:before {
    opacity: 1;
    transform: scale(1.1);
}

/* Touch feedback for camera buttons */
@media (hover: none) and (pointer: coarse) {
    .camera-button {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }

    .camera-button:active {
        transform: scale(0.9);
        background: rgba(44, 90, 160, 1);
    }

    .capture-btn {
        width: 80px;
        height: 80px;
        font-size: 28px;
    }

    .cancel-btn {
        padding: 14px 28px;
        font-size: 18px;
        min-height: 48px;
    }
}

/* Camera modal responsive adjustments */
@media (max-width: 768px) {
    .camera-modal video {
        max-width: 95vw;
        max-height: 60vh;
    }

    .camera-controls {
        bottom: 20px;
        gap: 15px;
    }

    .capture-btn {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .cancel-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .camera-modal video {
        max-width: 98vw;
        max-height: 50vh;
    }

    .camera-controls {
        bottom: 15px;
        flex-direction: column;
        gap: 12px;
    }

    .capture-btn {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }

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

/* Enhanced photo preview for mobile camera */
.photo-uploaded .photo-thumbnail img {
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.photo-uploaded .photo-thumbnail img:hover {
    transform: scale(1.02);
}

/* Camera permission request styling */
.camera-permission-request {
    background: linear-gradient(135deg, #2196f3 0%, #21cbf3 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 20px rgba(33, 150, 243, 0.3);
}

.camera-permission-request h3 {
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.camera-permission-request p {
    margin-bottom: 15px;
    opacity: 0.9;
}

.camera-permission-request button {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.camera-permission-request button:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile camera loading state */
.camera-loading {
    position: relative;
}

.camera-loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: cameraSpin 1s linear infinite;
}

@keyframes cameraSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
