/* Matching symptoms page style exactly */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    background: linear-gradient(135deg, #7fd3de 0%, #2b7c8a 55%, #0f3a44 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #ffffff;
    font-weight: 400;
}

/* Container matching symptoms page */
.form-container {
    background: #23646d;
    border-radius: 30px;
    box-shadow: 0 20px 60px rgba(30, 84, 98, 0.92);
    padding: 50px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Custom scrollbar matching symptoms page */
.form-container::-webkit-scrollbar {
    width: 10px;
}

.form-container::-webkit-scrollbar-track {
    background: #ffffff;
    border-radius: 10px;
}

.form-container::-webkit-scrollbar-thumb {
    background: #ffffff;
    border-radius: 10px;
}

form {
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}

h1 {
    color: #ffffff;
    text-align: center;
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 34px;
    font-weight: 500;
}

fieldset {
    margin-bottom: 20px;
    padding: 16px;
    background: rgba(36, 94, 108, 0.85);
    border: 2px solid #ffffff;
    border-radius: 14px;
}

legend {
    font-weight: 500;
    font-size: 18px;
    color: #ffffff;
    padding: 0 10px;
}

label {
    display: block;
    margin-top: 12px;
    margin-bottom: 8px;
    color: #ffffff;
    font-weight: 400;
    font-size: 14px;
}

label.inline {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
    margin-top: 8px;
    white-space: nowrap;
}

input, select {
    width: 100%;
    padding: 12px;
    margin-top: 4px;
    border: 1px solid #ffffff;
    border-radius: 10px;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.10);
    color: #ffffff;
    font-family: inherit;
    font-weight: 400;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

select option {
    background: #245e6c;
    color: #ffffff;
}

input:focus, select:focus {
    outline: none;
    border-color: #ffffff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.10);
}

input[type="radio"],
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
}

#healthCardSection {
    display: none;
    margin-top: 15px;
}

/* Phone input styling */
.phone-group {
    display: flex;
    align-items: center;
    margin-top: 4px;
}

.phone-prefix {
    padding: 12px 10px;
    border: 1px solid #ffffff;
    border-right: none;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px 0 0 10px;
    color: #ffffff;
}

.phone-input {
    border: 1px solid #ffffff;
    border-radius: 0 10px 10px 0;
}

/* Info message styling */
p {
    margin: 0;
    color: #ffffff;
    line-height: 1.5;
}

p[style*="background-color"] {
    background: rgba(36, 94, 108, 0.85) !important;
    border: 1px solid #ffffff;
    padding: 12px;
    border-radius: 10px;
    color: #ffffff !important;
}

#scanInfo {
    background: rgba(36, 94, 108, 0.85) !important;
    border: 1px solid #ffffff;
    color: #ffffff !important;
}

#ocrStatus {
    background: rgba(36, 94, 108, 0.85) !important;
    border: 1px solid #ffffff !important;
    color: #ffffff !important;
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
}

/* Camera scan elements */
video, canvas, #preview { 
    width: 100%; 
    max-width: 480px;
    border: 2px solid #ffffff; 
    margin-bottom: 10px; 
    display: block;
    border-radius: 14px;
}

#preview {
    max-height: 400px;
    object-fit: contain;
}

#video {
    display: none;
}

#video.show {
    display: block;
}

#preview {
    display: none;
}

#preview.show {
    display: block;
}

#snapshot, #processed { 
    display: none; 
}

/* File input label styling - matching back button */
.file-input-label {
    padding: 12px 24px;
    border: 1px solid #ffffff;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.15);
    color: white;
    cursor: pointer;
    display: inline-block;
    text-align: center;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.2s ease;
}

.file-input-label:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

input[type="file"] {
    display: none;
}

/* Buttons matching symptoms page */
button { 
    padding: 14px 22px; 
    border: none;
    border-radius: 10px; 
    background: linear-gradient(to right, rgba(20, 22, 22, 0.92));
    color: white;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Next button */
button[type="submit"], 
button[type="button"] {
    display: block;
    width: 100%;
    margin-top: 26px;
    padding: 18px 22px;
    background: linear-gradient(to right, rgba(20, 22, 22, 0.92));
    color: #ffffff;
    border: none;
    border-radius: 999px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
}

button[type="submit"]:hover, 
button[type="button"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Make it responsive for mobile */
@media screen and (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .form-container {
        padding: 30px 20px;
        max-height: 95vh;
    }
    
    h1 {
        font-size: 28px;
    }
    
    fieldset {
        padding: 12px;
    }
    
    input, select {
        font-size: 16px; /* Prevents auto-zoom on iOS */
    }
}

@media screen and (max-width: 480px) {
    h1 {
        font-size: 24px;
    }
    
    .form-container {
        padding: 24px 16px;
    }
}