/* 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% 0%;
}

/* Initial screen microcopy (duration + legal) */
.test-duration-text{
    margin: 18px 0 10px;
    text-align:center;
    font-size: 1.05rem;
    font-weight: 500;
    color: var(--text);
}
.legal-link{
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    opacity: .88;
}
.legal-link:hover{
    opacity: 1;
}

/* 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);
}
.modal-text {
	font-size: 16px;
}
.tabs ul {
	font-size: 16px;
}
.inputs-wrapper {
	font-size: 18px;
	line-height: 1.4;
}
@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) { 

    .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%);
    }
}
/* Glavni wrapper za test 
body.vision-test-page .vision-test-container {
    position: relative;
    max-width: 1100px;
    margin: 40px auto 80px;
    padding: 0 20px;
}

/* Sam test malo uže, da lepo stoji u sredini 
body.vision-test-page .test-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Pregazimo Gutenberg globalni max-width SAMO na ovoj strani 
body.vision-test-page .is-layout-constrained >
:where(:not(.alignleft):not(.alignright):not(.alignfull)) {
    max-width: 100% !important;
}
*/
/* FINAL MODAL – novi stil */
#finalModal .finalModal-card {
    max-width: 520px;
    margin: 6vh auto;
    padding: 32px 28px 26px;
    border-radius: 24px;
    border: none;
    background: linear-gradient(135deg, #ffffff, #f5f7fb);
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    position: relative;
}

#finalModal .finalModal-content-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
}

#finalModal .finalModal-icon-circle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e6f1fb;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

#finalModal .finalModal-icon-circle img {
    width: 28px;
    height: 28px;
}

#finalModal .finalModal-title {
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1f4875;
}

#finalModal .finalModal-text {
    font-size: 15px;
    color: #4a4a4a;
 
}

/* Wrapper za dugmad */
#finalModal .finalModal-btn {
    margin-top: 20px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
}

/* OBA dugmeta – ista širina na desktopu */
#finalModal .btn-copy,
#finalModal .fatalModal-btn-zakazi {
    display: inline-flex;
    align-items: center;
    justify-content: center;
             /* ista širina dok ima prostora */
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--primary);
    background: #ffffff;
    color: var(--primary);
    transition: all 0.2s ease;
}

/* Primarno dugme */
#finalModal .fatalModal-btn-zakazi {
    background: var(--primary);
    color: #ffffff;
}

/* Hover stanja */
#finalModal .btn-copy:hover {
    background: #e6effb;
}

#finalModal .fatalModal-btn-zakazi:hover {
    background: var(--primary-hover);
}

/* Kopi poruka */
#finalModal .copy-msg {
    margin-top: 8px;
    font-size: 12px;
    color: #7c7c7c;
}

/* Close ikonica */
#finalModal .close {
    position: absolute;
    top: 18px;
    right: 20px;
    font-size: 20px;
    color: #a0a0a0;
    cursor: pointer;
    transition: color 0.2s ease;
}

#finalModal .close:hover {
    color: #5c5c5c;
}

/* Responsive tweaks – na telefonu dugmad 100% širine, jedno ispod drugog */
@media (max-width: 600px) {
    #finalModal .finalModal-card {
        width: calc(100% - 32px);
        padding: 24px 18px 20px;
        margin-top: 10vh;
    }

    #finalModal .finalModal-title {
        font-size: 18px;
    }

    #finalModal .finalModal-btn {
        flex-direction: column;
        align-items: stretch;
    }


}


/* Frontend language switcher */
.vtp-lang-switcher{max-width:320px;margin:10px auto 0;display:flex;gap:10px;align-items:center;justify-content:flex-end}
.vtp-lang-switcher__label{font-size:14px;opacity:.8}
.vtp-lang-switcher__select{padding:6px 10px;border-radius:8px}


/* Legal modal */
.vtp-legal-modal{position:fixed;inset:0;z-index:10000;display:none}
.vtp-legal-modal.is-open{display:block}
.vtp-legal-modal__overlay{position:absolute;inset:0;background:rgba(0,0,0,.45)}
.vtp-legal-modal__panel{position:relative;max-width:640px;width:calc(100% - 32px);margin:8vh auto 0;background:#fff;border-radius:18px;box-shadow:0 18px 60px rgba(0,0,0,.25);padding:18px 18px 16px}
.vtp-legal-modal__title{margin:0 34px 10px 0;font-size:18px}
.vtp-legal-modal__body{font-size:14px;line-height:1.55;color:rgba(29,29,31,.82)}
.vtp-legal-modal__close{position:absolute;top:10px;right:12px;border:0;background:transparent;font-size:26px;line-height:1;cursor:pointer;color:rgba(29,29,31,.55)}
body.vtp-modal-open{overflow:hidden}
