/* Design System Variables */
:root {
    /* Colors */
    --primary: #3289bb;
    --primary-hover: #2778a7;
    --background: #fbfbfd;
    --surface: #ffffff;
    --text-primary: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary: #86868b;
    --border: #d2d2d7;
    --success: #28cd41;
    --error: #ff3b30;
    
    /* Typography */
    --font-primary: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-full: 9999px;
}

/* Base Styles */
html {
    width: 100%;
    height: 100%;
}

body {
    background: #efefef;
    color: var(--text-primary);
    font-family: "Hind", sans-serif;
    height: 100%;
    width: 100%;
    margin: 0;
}

input {
    accent-color: var(--primary);
}

/* Initial Container */
.initial-window {
    width: 100%;
    height: 100%;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    text-align: center;
    padding: 5% 0;
	border-radius: var(--radius-md);

}

.initial-window-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border);
}

.initial-window-body {
    width: 100%;
    display: block;
    padding: 5%;
}

/* Typography */
.header-colored {
    font-size: 2rem;
    color: var(--primary);
    font-weight: 700;
}

.header-default {
    font-size: 1rem;
    font-weight: 400;
    color: var(--text-secondary);
}

/* Form Elements */
.user-info-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(50, 137, 187, 0.1);
    outline: none;
}

.error-field {
    border: 2px solid #ff4444 !important;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.shake {
    animation: shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
    transform: translate3d(0, 0, 0);
}

@keyframes shake {
    10%, 90% {
        transform: translate3d(-1px, 0, 0);
    }
    20%, 80% {
        transform: translate3d(2px, 0, 0);
    }
    30%, 50%, 70% {
        transform: translate3d(-3px, 0, 0);
    }
    40%, 60% {
        transform: translate3d(3px, 0, 0);
    }
}

.disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Agreement Section */
.body-agreement-wrapper {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    width: 100%;
    padding: 0;
}

.agreement-radio-container {
    display: flex;
	flex-direction: column;
    align-items: center;
	justify-content: center; 
}
.agreement-radio {
	display: flex;
    align-items: center;	
	text-align: left;
 	gap: var(--spacing-sm);
    margin: var(--spacing-xs) 0;
    color: var(--text-secondary);
	font-size: 0.875rem;
}

.marketing-consent {
	margin-bottom: var(--spacing-lg);
}

.agreement-description {
	display: flex;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.6;
    margin-top: var(--spacing-lg);
}

/* Progress Bar */
.progress-bar {
    width: 100%;
    padding: var(--spacing-md) 0;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
	border-radius: var(--radius-md);
}

.progress-steps {
    max-width: 150px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    padding: 0;
}

.step {
    display: flex;
    align-items: center;
    flex: 1;
}

.step:last-child {
    flex: 0;
}

.step-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #d1d1d6;
    display: flex;
    position: relative;
    transition: all 0.3s ease;
}

.step.active .step-circle {
    background: var(--primary);
    box-shadow: 0 0 0 4px rgba(50, 137, 187, 0.1);
}

.step-line {
    flex: 1;
    height: 2px;
    background: #d1d1d6;
    margin: 0;
    transition: all 0.3s ease;
}

.step.active .step-line,
.step.completed .step-line {
    background: var(--primary);
}

.step.completed .step-circle {
    background: var(--primary);
}

/* Instructions */
.instructions-wrapper {
    margin: 0 auto;
    flex-wrap: wrap;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
	align-items: center;
    width: 80%;
}
.instructions {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--spacing-md);
}

.instructions-l,
.instructions-r {
    display: flex;
    width: 100%;
    gap: var(--spacing-md);
    border: none;
    padding: 0;
	flex-direction: column;
}

.instruction {
    flex: 1;
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
	align-items: center;
	text-align: center;
}

.instruction-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.instruction-number {
    color: var(--primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.instruction-content-text {
    color: var(--text-primary);
    font-size: 1rem;
    line-height: 1.5;
}

.icons-wrapper {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.icons-wrapper img {
    width: 2.5rem;
    margin: 0;
}

.distance-amount {
    color: var(--primary);
    font-weight: 500;
    padding: 0 var(--spacing-sm);
    border-bottom: 2px solid var(--primary);
}

/* Buttons */
.btn-start,
.btn-copy,
.hide-btn,
.btn-next,
.confirm-btn,
.modal-additional,
.fatalModal-btn-next,
.fatalModal-btn-zakazi {
    background: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
	margin: 0px 24px;
	align-self: center;
}

.btn-start:hover:not(.disabled),
.btn-copy:hover,
.hide-btn:hover,
.btn-next:hover,
.confirm-btn:hover,
.fatalModal-btn-next:hover,
.fatalModal-btn-zakazi:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
	
}

.btn-start.disabled {
    opacity: 0.5;
    background: var(--text-tertiary);
    cursor: not-allowed;
}
.button-wrapper {
	margin-bottom: var(--spacing-lg);
}

.info-button {
    position: absolute;
    top: 120px;
    right: 20px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    background: var(--surface);
    color: var(--primary);
    font-size: 18px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.info-button:hover {
    background: var(--primary);
    color: white;
    transform: scale(1.05);
}

/* Tabs Navigation */
.tabs {
    display: none;
    position: relative;
    background: var(--surface);
    width: 100%;
    height: 100%;
	border-radius: var(--radius-md);
}

.tabs input[name="tab-control"] {
    display: none;
}

.tabs ul {
    list-style-type: none;
    padding-left: 0;
    display: flex;
    flex-direction: row;
    margin: 0;
    flex-wrap: wrap;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
	padding: 0 var(--spacing-md) var(--spacing-md);}

.tabs ul li {
    display: none;
    pointer-events: none;
    padding: 0;
    background: none;
}

/* Tab Controls */
.tabs input[name="tab-control"]:nth-of-type(1):checked ~ ul > li:nth-child(1),
.tabs input[name="tab-control"]:nth-of-type(2):checked ~ ul > li:nth-child(2),
.tabs input[name="tab-control"]:nth-of-type(3):checked ~ ul > li:nth-child(3),
.tabs input[name="tab-control"]:nth-of-type(4):checked ~ ul > li:nth-child(4) {
    display: flex;
    width: 100%;
	justify-content: center;
}

.tabs ul li label {
    transition: all 0.3s ease-in-out;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px auto;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    white-space: nowrap;
    -webkit-touch-callout: none;
}

.tabs ul li label img {
    height: 3rem;
    vertical-align: middle;
    margin-right: 0.2em;
    transition: all 0.2s ease-in-out;
}

/* Tab Content */
.tabs .content {
    width: 100%;
    height: calc(100% - 2rem);
    display: flex;
    justify-content: center;
    align-items: center;
}

.tabs .content section {
    display: none;
    animation: content 0.3s ease-in-out;
}

/* Tab State Styles */
.tabs input[name="tab-control"]:nth-of-type(1):checked ~ ul > li:nth-child(1),
.tabs input[name="tab-control"]:nth-of-type(2):checked ~ ul > li:nth-child(2),
.tabs input[name="tab-control"]:nth-of-type(3):checked ~ ul > li:nth-child(3),
.tabs input[name="tab-control"]:nth-of-type(4):checked ~ ul > li:nth-child(4) {
    pointer-events: none;
    background: var(--primary);
    border-radius: var(--radius-sm);
}

.tabs input[name="tab-control"]:nth-of-type(1):checked ~ ul > li:nth-child(1) > label,
.tabs input[name="tab-control"]:nth-of-type(2):checked ~ ul > li:nth-child(2) > label,
.tabs input[name="tab-control"]:nth-of-type(3):checked ~ ul > li:nth-child(3) > label,
.tabs input[name="tab-control"]:nth-of-type(4):checked ~ ul > li:nth-child(4) > label {
    color: white;
}

/* Content Display Rules */
.tabs input[name="tab-control"]:nth-of-type(1):checked ~ .content > section:nth-child(1),
.tabs input[name="tab-control"]:nth-of-type(2):checked ~ .content > section:nth-child(2),
.tabs input[name="tab-control"]:nth-of-type(3):checked ~ .content > section:nth-child(3),
.tabs input[name="tab-control"]:nth-of-type(4):checked ~ .content > section:nth-child(4) {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
}

/* Test Wrapper */
.test-wrapper {
    display: none;
    width: 100%;
    height: 100%;
    padding: var(--spacing-xl);
	  text-align: center;
	
}

/* Visual Acuity Test */
.visualAcuity {
    height: calc(100% - 5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.va-middle {
    display: flex;
}
.up {
    transform: rotate(180deg);
}

.left {
    transform: rotate(90deg);
}

.right {
    transform: rotate(270deg);
}


.test-sign {
    width: 5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.test-sign-img {
    width: 3.6rem !important;
}

.test-sign-img-1 {
    width: 1.8rem !important;
    transform: rotate(180deg);
}

.test-sign-img-2 {
    width: 1.3rem !important;
    transform: rotate(90deg);
}

.test-sign-img-3 {
    width: 1rem !important;
    transform: rotate(270deg);
}

.test-sign-img-4 {
    width: 0.8rem !important;
    transform: rotate(180deg);
}

.test-sign-img-5 {
    width: 0.65rem !important;
    transform: rotate(90deg);
}

.sign {
    border: 1px solid var(--border);
    cursor: pointer;
    width: 6rem;
    margin: 1.2rem;
    border-radius: var(--radius-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
    background: var(--surface);
}

.sign:hover {
    box-shadow: var(--shadow-md);
}

.sign img {
    transition: none;
    transform: none !important;
}

/* Tests Content */
.astigmatism,
.nearVision,
.colorVision {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.astigmatism-top,
.nearVision-top {
    width: 100%;
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.astigmatism-bottom,
.nearVision-bottom {
   display: flex;
    flex-direction: column;
    width: 100%;
}

/* Font sizes for tests */
.fs-1 { font-size: 1.45rem; margin-bottom: 0.6rem; }
.fs-2 { font-size: 1.25rem; margin-bottom: 0.7rem; }
.fs-3 { font-size: 1.05rem; margin-bottom: 0.7rem; }
.fs-4 { font-size: 0.85rem; margin-bottom: 0.7rem; }
.fs-5 { font-size: 0.65rem; }




/* Color Vision Test */
.color-vision {
    text-align: center;
}

.cv-step {
    width: 100%;
    margin: 0;
    display: none;
    justify-content: center;
    align-items: center;
    text-align: start;
}
.cv-image {
	width: 50%;
}
.cv-step-active {
    display: flex;
}

.cv-input-div {
    display: flex;
    flex-direction: column;
    margin-left: var(--spacing-xl);
}

.cv-bold-label {
    font-weight: 600;
}
.cv-label {
	font-size: 1rem;
}

.cv-input {
    margin: var(--spacing-md) 0;
    padding: var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}
.cv-input:focus {
	border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(50, 137, 187, 0.1);
    outline: none;
}

.cv-input::placeholder {
    font-style: italic;
}

/* Input Groups */
.inputs-wrapper {
	align-items: center;
	display: flex;
	flex-direction: column; 
}

.confirm-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
	margin-top: var(--spacing-xl);

}

.inputs {
    display: flex;
    margin-top: var(--spacing-md);
    justify-content: center;
}

.true-wrapper,
.false-wrapper {

    display: flex;
    align-items: center;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    cursor: pointer;
    margin: 0 var(--spacing-sm);
}

.true-wrapper:hover,
.false-wrapper:hover {
    border-color: var(--primary);
    background: rgba(50, 137, 187, 0.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.modal-content,
.fatalModal-modal-content {
    background: var(--surface);
    margin: 10% auto;
    padding: var(--spacing-xl);
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
}

.modal-content-body,
.fatalModal-modal-content-body, 
.finalModal-content-body {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.modal-title,
.fatalModal-modal-title,
.finalModal-title {
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    margin-top: var(--spacing-md);
}

.modal-text,
.fatalModal-modal-text,
.finalModal-text {
    text-align: center;
    margin: var(--spacing-md);
}

.modal-content img,
.fatalModal-modal-content img {
    width: 40%;
}
.modal-icon {
	width: 20%;
}

.close,
.fatalModal-close {
    color: var(--text-tertiary);
    float: right;
    font-size: 28px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close:hover,
.fatalModal-close:hover {
    color: var(--text-primary);
}

.finalModal-btn {
	display: flex;
	flex-direction: row;
	align-items: center;
}

/* Additional Classes */
.copy-msg {
    display: none;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .begining-container {
        margin: 10% 0 !important;
    }
    
    .initial-window {
        margin: 10% 0 !important;
    }

    .tabs .content {
        width: 100%;
    }

    .instructions-wrapper {
        flex-direction: column;
        padding: var(--spacing-sm);
    }

    .instructions-l,
    .instructions-r {
        flex-direction: column;
    }

    .instruction {
        padding: var(--spacing-sm) 0;
    }

    .instruction:last-child {
        border-bottom: none;
    }

    .astigmatism-top,
    .nearVision-top {
        flex-direction: column;
    }

    .inputs-wrapper {
        margin-left: 0;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
    }

    .confirm-wrapper {
        margin-right: 0;
    }

    .inputs {
        flex-direction: row;
        gap: var(--spacing-md);
    }

    .visualAcuity img {
        width: 4rem;
        margin: 1rem;
    }

    .test-sign {
        margin: 0;
    }

    .modal-content,
    .fatalModal-modal-content {
        width: 90%;
        margin: 5vh auto;
    }

    .cv-step {
        flex-direction: column;
    }

    .cv-input-div {
        margin-left: 0;
        width: 90%;
        margin-top: var(--spacing-lg);
    }
}

/* Animations */
@keyframes content {
    from {
        opacity: 0;
        transform: translateY(5%);
    }
    to {
        opacity: 1;
        transform: translateY(0%);
    }
}

.has-global-padding {
padding-right: 0;
padding-left: 0;
}