/* Hair Test Page Styles */
.hair-test-container {
    min-height: 100vh;
    background-color: #ffffff;
    padding: 40px 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Progress Bar / Navigation */
.hair-test-progress {
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    padding: 0 40px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    width: 100%;
}

.progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    min-width: 0;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 12px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #E0E0E0;
    z-index: 0;
}

.progress-step:last-child::after {
    display: none;
}

.progress-step.active::after {
    background-color: #4CAF50;
}

.progress-step .step-label {
    font-size: 14px;
    font-weight: 500;
    color: #666666;
    text-align: center;
    position: relative;
    z-index: 1;
    background-color: #ffffff;
    padding: 0 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.progress-step.active .step-label {
    color: #4CAF50;
    font-weight: 600;
}

.progress-step .step-percentage {
    font-size: 12px;
    color: #999999;
    margin-top: 4px;
    white-space: nowrap;
}

/* Previous Link */
.hair-test-previous {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 10;
}

.previous-link {
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    min-height: 44px;
    line-height: 28px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.previous-link:hover {
    color: #333333;
    text-decoration: none;
}

/* Exit Button */
.hair-test-exit {
    position: absolute;
    top: 40px;
    right: 40px;
    z-index: 10;
}

.exit-link {
    color: #666666;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: inline-block;
    padding: 8px 12px;
    min-height: 44px; /* Minimum touch target size */
    line-height: 28px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.exit-link:hover {
    color: #333333;
    text-decoration: none;
}

/* Main Content */
.hair-test-content {
    max-width: 600px;
    width: 100%;
    margin: 80px auto 40px;
    text-align: center;
    padding: 0 20px;
    box-sizing: border-box;
}

.hair-test-question {
    margin-bottom: 60px;
}

.hair-test-question h2 {
    font-size: 28px;
    font-weight: 400;
    color: #333333;
    margin: 0;
    line-height: 1.4;
    word-wrap: break-word;
}

/* Input Field */
.hair-test-input-wrapper {
    margin-bottom: 80px;
    text-align: left;
}

.hair-test-label {
    display: block;
    font-size: 14px;
    color: #666666;
    margin-bottom: 8px;
    font-weight: 500;
}

.hair-test-input {
    width: 100%;
    border: none;
    border-bottom: 2px solid #4CAF50;
    background-color: transparent;
    padding: 12px 0;
    font-size: 16px;
    color: #333333;
    outline: none;
    transition: border-color 0.3s ease;
    min-height: 44px; /* Minimum touch target size */
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.hair-test-input:focus {
    border-bottom-color: #45a049;
}

.hair-test-input::placeholder {
    color: #999999;
}

/* Select Dropdown */
.hair-test-select {
    width: 100%;
    border: none;
    border-bottom: 2px solid #4CAF50;
    background-color: transparent;
    padding: 12px 0;
    font-size: 16px;
    color: #333333;
    outline: none;
    transition: border-color 0.3s ease;
    min-height: 44px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%234CAF50' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    padding-right: 30px;
    cursor: pointer;
}

.hair-test-select:focus {
    border-bottom-color: #45a049;
}

.hair-test-select option {
    background-color: #ffffff;
    color: #333333;
    padding: 10px;
}

/* Radio Button Options */
.hair-test-radio-wrapper {
    margin-bottom: 60px;
    text-align: left;
}

.hair-test-radio-option {
    display: block;
    margin-bottom: 20px;
    padding: 15px;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.hair-test-radio-option:hover {
    border-color: #4CAF50;
    background-color: #F5F9F5;
}

.hair-test-radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    margin: 0;
}

.hair-test-radio-option input[type="radio"]:checked + .radio-label {
    color: #4CAF50;
    font-weight: 600;
}

.hair-test-radio-option input[type="radio"]:checked ~ .radio-label {
    color: #4CAF50;
    font-weight: 600;
}

.hair-test-radio-option:has(input[type="radio"]:checked) {
    border-color: #4CAF50;
    background-color: #F5F9F5;
}

.radio-label {
    display: block;
    font-size: 16px;
    color: #333333;
    padding-left: 35px;
    position: relative;
    line-height: 1.5;
}

.radio-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 2px;
    width: 20px;
    height: 20px;
    border: 2px solid #999999;
    border-radius: 50%;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.hair-test-radio-option input[type="radio"]:checked + .radio-label::before,
.hair-test-radio-option:has(input[type="radio"]:checked) .radio-label::before {
    border-color: #4CAF50;
    background-color: #4CAF50;
}

.hair-test-radio-option input[type="radio"]:checked + .radio-label::after,
.hair-test-radio-option:has(input[type="radio"]:checked) .radio-label::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 7px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ffffff;
}

.radio-subtext {
    display: block;
    font-size: 13px;
    color: #999999;
    font-weight: 400;
    margin-top: 5px;
    font-style: italic;
}

/* Hair Loss Image Wrapper */
.hair-loss-image-wrapper {
    margin: 40px 0 50px;
    text-align: center;
    width: 100%;
}

.hair-loss-stages-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hair-loss-stage-option {
    display: block;
    border: 2px solid #E0E0E0;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.hair-loss-stage-option:hover {
    border-color: #4CAF50;
    background-color: #F5F9F5;
}

.hair-loss-stage-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.hair-loss-stage-option:has(input[type="radio"]:checked) {
    border-color: #4CAF50;
    background-color: #F5F9F5;
}

.stage-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.stage-images {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
}

.head-view {
    width: 60px;
    height: 60px;
}

.head-view svg {
    width: 100%;
    height: 100%;
}

.stage-label {
    font-size: 14px;
    font-weight: 500;
    color: #333333;
    margin-top: 5px;
}

.hair-loss-stage-option:has(input[type="radio"]:checked) .stage-label {
    color: #4CAF50;
    font-weight: 600;
}

/* Question Wrapper */
.hair-test-question-wrapper {
    width: 100%;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Next Button */
.hair-test-button-wrapper {
    margin-top: 60px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.hair-test-back-btn {
    background-color: transparent;
    color: #666666;
    border: 2px solid #E0E0E0;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 120px;
    min-height: 44px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hair-test-back-btn:hover {
    border-color: #999999;
    color: #333333;
    background-color: #f5f5f5;
}

.hair-test-next-btn {
    background-color: #333333;
    color: #ffffff;
    border: none;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    min-width: 150px;
    min-height: 44px; /* Minimum touch target size */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.hair-test-next-btn:hover:not(:disabled) {
    background-color: #222222;
    transform: translateY(-1px);
}

.hair-test-next-btn:active:not(:disabled) {
    transform: translateY(0);
}

.hair-test-next-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Privacy Text */
.hair-test-privacy {
    position: absolute;
    bottom: 40px;
    left: 40px;
    max-width: 500px;
    box-sizing: border-box;
}

.privacy-text {
    font-size: 12px;
    color: #999999;
    line-height: 1.6;
    margin: 0;
    word-wrap: break-word;
}

.privacy-link {
    color: #4CAF50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.privacy-link:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hair-test-progress {
        padding: 0 30px;
    }

    .progress-steps {
        gap: 15px;
    }

    .progress-step .step-label {
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .hair-test-container {
        padding: 20px 15px;
        min-height: 100vh;
        justify-content: flex-start;
        padding-top: 100px;
        padding-bottom: 120px;
    }

    .hair-test-progress {
        top: 20px;
        padding: 0 20px;
        position: fixed;
        background-color: #ffffff;
        z-index: 100;
        padding-bottom: 10px;
    }

    .progress-steps {
        gap: 10px;
    }

    .progress-step {
        gap: 6px;
    }

    .progress-step .step-label {
        font-size: 11px;
        padding: 0 5px;
        white-space: normal;
        line-height: 1.3;
    }

    .progress-step .step-percentage {
        font-size: 10px;
    }

    .progress-step::after {
        top: 10px;
        height: 1.5px;
    }

    .hair-test-previous {
        top: 20px;
        left: 20px;
        position: fixed;
        z-index: 101;
        background-color: #ffffff;
        padding: 5px 10px;
        border-radius: 4px;
    }

    .previous-link {
        font-size: 13px;
        padding: 6px 10px;
    }

    .hair-test-exit {
        top: 20px;
        right: 20px;
        position: fixed;
        z-index: 101;
        background-color: #ffffff;
        padding: 5px 10px;
        border-radius: 4px;
    }

    .exit-link {
        font-size: 13px;
    }

    .hair-test-radio-wrapper {
        margin-bottom: 40px;
    }

    .hair-test-radio-option {
        margin-bottom: 15px;
        padding: 12px;
    }

    .radio-label {
        font-size: 15px;
        padding-left: 30px;
    }

    .hair-loss-image-wrapper {
        margin: 30px 0 40px;
    }

    .hair-loss-stages-image {
        max-width: 100%;
    }

    .hair-test-content {
        margin-top: 40px;
        margin-bottom: 20px;
        padding: 0 15px;
    }

    .hair-test-question {
        margin-bottom: 40px;
    }

    .hair-test-question h2 {
        font-size: 22px;
        line-height: 1.3;
    }

    .hair-test-input-wrapper {
        margin-bottom: 50px;
    }

    .hair-test-label {
        font-size: 13px;
    }

    .hair-test-input {
        font-size: 15px;
        padding: 10px 0;
    }

    .hair-test-button-wrapper {
        margin-top: 30px;
    }

    .hair-test-next-btn {
        padding: 12px 30px;
        font-size: 15px;
        width: 100%;
        max-width: 300px;
    }

    .hair-test-back-btn {
        padding: 12px 25px;
        font-size: 15px;
        min-width: 100px;
    }

    .hair-test-button-wrapper {
        gap: 10px;
    }

    .hair-test-select {
        font-size: 15px;
        padding: 10px 0;
        padding-right: 30px;
    }

    .hair-test-privacy {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        max-width: 100%;
        margin-top: 40px;
        padding: 0 15px;
        text-align: center;
    }

    .privacy-text {
        font-size: 11px;
        line-height: 1.5;
    }
}

@media (max-width: 576px) {
    .hair-test-container {
        padding: 15px 10px;
        padding-top: 90px;
        padding-bottom: 100px;
    }

    .hair-test-progress {
        top: 15px;
        padding: 0 15px;
        padding-bottom: 8px;
    }

    .progress-steps {
        gap: 8px;
    }

    .progress-step {
        gap: 4px;
    }

    .progress-step .step-label {
        font-size: 10px;
        padding: 0 3px;
        line-height: 1.2;
    }

    .progress-step .step-percentage {
        font-size: 9px;
    }

    .progress-step::after {
        top: 8px;
        height: 1px;
    }

    .hair-test-previous {
        top: 15px;
        left: 15px;
        padding: 4px 8px;
    }

    .previous-link {
        font-size: 12px;
        padding: 4px 8px;
    }

    .hair-test-exit {
        top: 15px;
        right: 15px;
        padding: 4px 8px;
    }

    .exit-link {
        font-size: 12px;
    }

    .hair-test-radio-wrapper {
        margin-bottom: 30px;
    }

    .hair-test-radio-option {
        margin-bottom: 12px;
        padding: 10px;
    }

    .radio-label {
        font-size: 14px;
        padding-left: 28px;
    }

    .radio-subtext {
        font-size: 12px;
    }

    .hair-loss-image-wrapper {
        margin: 25px 0 30px;
    }

    .hair-loss-stages-image {
        max-width: 100%;
    }

    .hair-test-content {
        margin-top: 30px;
        padding: 0 10px;
    }

    .hair-test-question {
        margin-bottom: 30px;
    }

    .hair-test-question h2 {
        font-size: 20px;
        line-height: 1.2;
    }

    .hair-test-input-wrapper {
        margin-bottom: 40px;
    }

    .hair-test-label {
        font-size: 12px;
        margin-bottom: 6px;
    }

    .hair-test-input {
        font-size: 14px;
        padding: 8px 0;
    }

    .hair-test-button-wrapper {
        margin-top: 25px;
        flex-direction: column;
        gap: 10px;
    }

    .hair-test-back-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
        width: 100%;
    }

    .hair-test-next-btn {
        padding: 12px 25px;
        font-size: 14px;
        min-width: 100%;
        max-width: 100%;
    }

    .hair-test-select {
        font-size: 14px;
        padding: 8px 0;
        padding-right: 30px;
    }

    .hair-test-privacy {
        margin-top: 30px;
        padding: 0 10px;
    }

    .privacy-text {
        font-size: 10px;
        line-height: 1.4;
    }
}

@media (max-width: 400px) {
    .hair-test-progress {
        padding: 0 10px;
    }

    .progress-steps {
        gap: 5px;
    }

    .progress-step .step-label {
        font-size: 9px;
        padding: 0 2px;
    }

    .progress-step .step-percentage {
        font-size: 8px;
    }

    .hair-test-question h2 {
        font-size: 18px;
    }

    .hair-test-input {
        font-size: 14px;
    }

    .hair-test-next-btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* Landscape orientation for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hair-test-container {
        padding-top: 80px;
        padding-bottom: 80px;
    }

    .hair-test-progress {
        top: 15px;
    }

    .hair-test-content {
        margin-top: 30px;
    }

    .hair-test-question {
        margin-bottom: 30px;
    }

    .hair-test-question h2 {
        font-size: 20px;
    }

    .hair-test-input-wrapper {
        margin-bottom: 30px;
    }

    .hair-test-button-wrapper {
        margin-top: 25px;
    }

    .hair-test-privacy {
        margin-top: 25px;
    }
}

/* Scalp Assessment Styles */
.scalp-assessment-wrapper {
    margin: 40px 0;
    text-align: center;
}

.scalp-sample-image {
    margin-bottom: 30px;
}

.scalp-sample-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 15px;
}

.scalp-hint {
    color: #666666;
    font-size: 14px;
    margin-top: 10px;
}

.scalp-upload-section {
    margin-top: 30px;
}

.scalp-preview-wrapper {
    margin: 30px 0;
    position: relative;
    display: inline-block;
}

.scalp-preview-img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scalp-remove-btn {
    margin-top: 15px;
    padding: 8px 20px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.scalp-remove-btn:hover {
    background-color: #c82333;
}

.scalp-button-group {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 30px;
}

.scalp-upload-btn,
.scalp-camera-btn {
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #333333;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 200px;
}

.scalp-upload-btn {
    background-color: #ffffff;
    color: #333333;
}

.scalp-upload-btn:hover {
    background-color: #f5f5f5;
}

.scalp-camera-btn {
    background-color: #333333;
    color: #ffffff;
}

.scalp-camera-btn:hover {
    background-color: #555555;
}

/* Responsive Scalp Assessment */
@media (max-width: 768px) {
    .scalp-button-group {
        flex-direction: column;
        align-items: center;
    }

    .scalp-upload-btn,
    .scalp-camera-btn {
        width: 100%;
        max-width: 300px;
    }

    .scalp-preview-img {
        max-height: 300px;
    }
}

@media (max-width: 576px) {
    .scalp-sample-img {
        border-radius: 5px;
    }

    .scalp-upload-btn,
    .scalp-camera-btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .scalp-preview-img {
        max-height: 250px;
    }
}

