/* Animation & base colors */
:root {
    --pf-animation: 0.5s cubic-bezier(0.25, 0.8, 0.5, 1);
    --pf-color-primary: #003057;
    --pf-color-secondary: #D4EAE4;
    --pf-grey-dark: grey;
}

/* Base modal setup */

.productfinder-modal-full-width {
    width: 100%;
    left: 0 !important;
}

.productfinder-modal-full-width .modal-inner-wrap {
    width: 100%;
    height: 100%;
    margin: 0;
}

#productfinderWidgetContent {
    margin-top: -42px;
}

#productfinderWidgetContent .steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

#productfinderWidgetContent .steps .line {
    height: 4px;
    width: 100%;
    position: absolute;
    background-color: var(--pf-color-secondary);
    z-index: 0;
    margin: 0 5px;
}

#productfinderWidgetContent .steps .step {
    width: 50px;
    height: 50px;
    margin-left: 5px;
    font-weight: 600;
    color: var(--pf-color-primary);
    background-color: var(--pf-color-secondary);
    border-radius: 50%;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color var(--pf-animation);
    z-index: 1;
}

#productfinderWidgetContent .steps .step.active {
    color: var(--pf-color-secondary);
    background-color: var(--pf-color-primary);
    font-weight: bold;
}

/* os: replace by tailwind styles in app/code/Pearson/Productfinder/view/frontend/templates/widget/productfinder.phtml */
#productfinderWidgetContent .title {
    font-family: Sansation;
/*
    font-family: sans-serif;
    font-size: 2.25rem;
    font-weight: 400;
    line-height: 1.2;
    color: var(--pf-color-primary);
    margin: 1rem 0 1rem 0;
 */
}

#productfinderWidgetContent .item {
    margin: 2rem 0;
}

/* os: replace by tailwind styles in app/code/Pearson/Productfinder/view/frontend/templates/widget/productfinder.phtml
#productfinderWidgetContent .item .question {
    margin: 2rem 0;
    font-size: 1.7rem;
    font-weight: bold;
    line-height: 1.5;
    letter-spacing: 0.095px;
}
 */

#productfinderWidgetContent .item .answer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    max-height: 44vh;
    overflow-y: auto;
    padding: 30px;
}

#productfinderWidgetContent .item .answer > div {
    margin-bottom: 16px;
    padding-left: 0;
}

/* Radio buttons */
.ps-form-controls {
    display: flex;
    position: relative;
    flex: 1 0 auto;
}

.ps-radio {
    position: absolute;
    right: 20px;
    top: 50%;
    visibility: hidden;
    z-index: 0;
}

.ps-radio ~ label {
    user-select: none;
    width: 100%;
    min-height: 40px;
    display: inline-block;
    font-size: 1rem;
    background-color: white;
    color: black;
    box-shadow: 0 0 25px rgba(0, 14, 26, 0.2);
    text-align: left;
    cursor: pointer;
    padding: 8px 20px;
    border-radius: 12px;
    position: relative;
    transition: background-color var(--pf-animation), color var(--pf-animation);
    z-index: 2;
}

.ps-radio:checked ~ label {
    background-color: var(--pf-color-primary);
    color: var(--pf-color-secondary);
}

.ps-radio:checked ~ label::after {
    content: '✔';
    background-color: var(--pf-color-primary);
    color: var(--pf-color-secondary);
    position: absolute;
    right: 20px;
    top: 50%;
    font-style: normal;
    font-size: 0.75em;
    line-height: 0;
}

/* Checkbox */
.ps-checkbox {
    position: absolute;
    top: 16px;
    left: 14px;
    z-index: 2;
    width: 18px;
    height: 18px;
    color: black;
    border-color: black;
    flex: 1 0 auto;
    margin: 0;
}

.ps-checkbox ~ label {
    flex: 1 0 100%;
    width: 100%;
    min-height: 40px;
    display: block;
    font-size: 1rem;
    background-color: white;
    color: black;
    box-shadow: 0 0 25px rgba(0, 14, 26, 0.2);
    text-align: left;
    cursor: pointer;
    padding: 8px 20px 8px 45px;
    border-radius: 12px;
    border: 1px solid white;
    position: relative;
    transition: border var(--pf-animation);
    line-height: 36px;
}

.ps-checkbox:checked {
    color: black;
    border-color: black;
    background-color: white;
    background-size: 75%;
}

.ps-checkbox:checked ~ label {
    border: 1px solid var(--pf-color-primary);
}

/* Navigation */
#productfinderWidgetContent .pf-navigation {
    margin: 2rem 0 2rem;
}

#productfinderWidgetContent .pf-navigation > * {
    margin: 0 0 2rem;
}

.pf-action-buttons {
    display: flex;
    justify-content: center;
}

.previous-step,
.next-step {
    width: 80%;
    margin: 0 1rem;
}

.pf-skip-link {
    display: flex;
    justify-content: center;
}

.pf-search-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.skip {
    color: var(--pf-grey-dark);
    font-size: 1.6rem;
}

.found {
    font-size: 2rem;
    font-weight: 300;
    color: var(--pf-color-primary);
}

/*
.found .count.loading {
    color: var(--pf-color-primary);
    width: 20px;
    height: 20px;
    margin: 50px auto;
    animation: spin 2s infinite linear;
    position: relative;
}

.found .count.loading::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-image: url('loader.svg');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 8px;
    font-size: 20px;
    position: absolute;
    top: 0;
}
*/

.showresults {
    color: #005A70;
    font-weight: 600;
}

/* Modal wrapper */
.productfinder-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    display: flex;
    justify-content: flex-end;
    align-items: center;

    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
}


.productfinder-modal.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}


.productfinder-modal.hide {
    opacity: 0 !important;
    transform: translateX(100%) !important;
    pointer-events: none !important;
}


.productfinder-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}


.productfinder-modal .modal-inner {
    position: relative;
    background: white;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 12px;
    z-index: 2;
    padding: 2rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.4s ease forwards;
}


.productfinder-modal .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
    background: none;
    border: none;
    color: #333;
    cursor: pointer;
    z-index: 3;
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(50%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.pf-navigation{
	.pf-action-buttons{
		display: flex;
		justify-content: center;
		.next-step{
			background-color: #003056;
			border: 1px solid #003056;
			color: #d4eae4;
			width: 25%;
			padding: 10px;
			border-radius: 8px;
			display: inline-block;
			line-height: normal;
			font-size: 15px;
			font-weight: 700;
			/*font-family: 'Sansation';*/
		}
		.previous-step{
			border: 1px solid #007fa3;
			color: #003057;
			width: 25%;
			padding: 10px;
			border-radius: 8px;
			display: inline-block;
			line-height: normal;
			font-size: 15px;
			font-weight: 700;
			/*font-family: 'Sansation';*/
		}
	}
}
