/**
 * Deadline Funnel Checkout Signup Styles
 * Perfect-pixel implementation based on design mockup
 * Updated for 2025 best practices
 */

/* ===== FONTS ===== */
@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato-regular/lato-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato-bold/lato-bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/lato-semibold/lato-semibold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #000;
}

body * {
    font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== HEADER STYLES ===== */
.checkout-header {
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    padding: 16px 20px
}

.checkout-header .uk-container {
    max-width: 960px;
}

.checkout-header-logo {
    max-width: 226px;
    height: auto;
}

.checkout-header-title {
    font-family: Lato, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #333333;
    margin: 0;
}

/* ===== MAIN LAYOUT ===== */
.checkout-main {
    background: #f8f9fa;
    min-height: calc(100vh - 120px);
    padding: 30px 0;
}

.checkout-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.checkout-grid {
    display: grid;
    grid-template-columns: 1fr 382px;
    gap: 30px;
    align-items: start;
}

@media (max-width: 1024px) {
    .checkout-grid {
        grid-template-columns: 1fr 300px;
    }
}

@media (max-width: 768px) {
    .checkout-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
}

/* ===== FORM SECTION ===== */
.checkout-form-section {
    margin-bottom: 24px;
}

.checkout-form-title {
    font-size: 24px;
    font-weight: 700;
    color: #2B2B2B;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.checkout-form-subtitle {
    line-height: 1.2;
}

.checkout-features-title {
    font-size: 16px;
    font-weight: 600;
    color: #2B2B2B;
    margin: 24px 0 16px 0;
}

.checkout-features-list {
    list-style: none;
    padding: 0;
    margin: 0 0 32px 0;
}

.checkout-features-list li {
    position: relative;
    padding: 0 0 8px 18px;
    line-height: 1.5;
}

.checkout-features-list li:last-of-type {
    padding-bottom: 0;
}

.checkout-features-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    top: 0;
    font-weight: bold;
    font-size: 14px;
    color: #767676;

}

/* ===== FORM STYLES ===== */
.checkout-form-styles {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 5px 0 rgba(163, 163, 163, 0.1);
    margin-bottom: 40px;
}

.checkout-form-styles:last-of-type {
    margin-bottom: 0;
}

.checkout-form-group-title {
    font-size: 16px;
    margin-bottom: .5rem;
    font-weight: 700;
    line-height: 1.2;
    color: #2B2B2B;
    position: relative;
}

.checkout-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 640px) {
    .checkout-input-group {
        grid-template-columns: 1fr;
    }
}

/* ===== FLOATING LABEL STYLES ===== */
.checkout-floating-label {
    position: relative;
    margin-bottom: 20px;
}

.checkout-floating-label:last-of-type {
    margin-bottom: 0;
}

.checkout-floating-label.focused .uk-form-danger {
    color: #000000;
}

.checkout-floating-label .checkout-label {
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 15px;
    font-weight: 400;
    color: #767676;
    background: #fff;
    transition: all 0.2s ease-in-out;
    pointer-events: none;
    z-index: 1;
}

.checkout-floating-label .checkout-input {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-family: inherit;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #fff;
    min-height: 55px;
}

.checkout-floating-label .checkout-input.uk-form-success, .checkout-floating-label .checkout-input.uk-form-success:focus {
    color: #2B2B2B;
}

.checkout-floating-label .checkout-input:focus {
    outline: none;
    border-color: #579A0B;
    box-shadow: 0 0 0 3px rgba(87, 154, 11, 0.25);
}


.checkout-floating-label:not(.focused) .checkout-input.uk-form-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.checkout-floating-label .checkout-input::placeholder {
    color: transparent;
}

.checkout-floating-label .checkout-input:focus::placeholder {
    color: #767676;
}

/* Label animations - float up when focused or has content */
.checkout-floating-label .checkout-input:focus + .checkout-label,
.checkout-floating-label .checkout-input:not(:placeholder-shown) + .checkout-label,
.checkout-floating-label .checkout-input.has-value + .checkout-label {
    top: 2px;
    left: 12px;
    font-size: 10px;
    font-weight: 500;
    color: #767676;
    background: transparent;
}

.checkout-label .checkout-label-required {
    color: #dc3545;
}

.checkout-floating-label .checkout-input:focus + .checkout-label .checkout-label-required,
.checkout-floating-label .checkout-input:not(:placeholder-shown) + .checkout-label .checkout-label-required,
.checkout-floating-label .checkout-input.has-value + .checkout-label .checkout-label-required {
    color: #dc3545;
}

/* Error state for floating labels */
.checkout-floating-label .checkout-input.error + .checkout-label {
    color: #dc3545;
}

/* Autofill detection keyframes */
@keyframes onAutoFillStart {
    from { /*empty*/
    }
    to { /*empty*/
    }
}

@keyframes onAutoFillCancel {
    from { /*empty*/
    }
    to { /*empty*/
    }
}

/* Browser autofill detection */
.checkout-floating-label .checkout-input:-webkit-autofill {
    animation-name: onAutoFillStart;
    animation-duration: 0.01s;
}

.checkout-floating-label .checkout-input:not(:-webkit-autofill) {
    animation-name: onAutoFillCancel;
    animation-duration: 0.01s;
}

/* Fix for autofill styling */
.checkout-floating-label .checkout-input:-webkit-autofill,
.checkout-floating-label .checkout-input:-webkit-autofill:hover,
.checkout-floating-label .checkout-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset;
    -webkit-text-fill-color: #495057;
    transition: background-color 5000s ease-in-out 0s;
}


/* Non-floating label fallback (for compatibility) */
.checkout-input-wrapper:not(.checkout-floating-label) .checkout-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    margin-bottom: 8px;
}

.checkout-input-wrapper:not(.checkout-floating-label) .checkout-label-required {
    color: #dc3545;
}

.checkout-input-wrapper:not(.checkout-floating-label) .checkout-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    font-family: inherit;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: #fff;
}

.checkout-input-wrapper:not(.checkout-floating-label) .checkout-input:focus {
    outline: none;
    border-color: #0db5ad;
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.checkout-input-wrapper:not(.checkout-floating-label) .checkout-input.error {
    border-color: #dc3545;
}

.checkout-input-wrapper:not(.checkout-floating-label) .checkout-input::placeholder {
    color: #adb5bd;
}

/* ===== PRICING CARDS ===== */
.checkout-pricing-title {
    font-size: 18px;
    font-weight: 600;
    color: #2B2B2B;
    margin: 32px 0 20px 0;
    position: relative;
    padding-left: 16px;
}

.checkout-pricing-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 16px;
    background: #0db5ad;
    border-radius: 2px;
}

.checkout-pricing-options {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 24px;
    box-shadow: 0 2px 5px 0 rgba(163, 163, 163, 0.1);
}

@media (max-width: 640px) {
    gap: 16px;
}

.checkout-pricing-card {
    position: relative;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: 10px 20px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    display: flex;
    justify-content: space-between;
    box-shadow: 0 2px 5px 0 rgba(163, 163, 163, 0.1);
    overflow: hidden;
}

.checkout-pricing-card:hover {
    background-color: #fafafa;
    box-shadow: 0 4px 10px 1px rgba(163, 163, 163, 0.1);
    transform: translateY(-2px);
}

.checkout-pricing-card:hover .checkout-pricing-period, .checkout-pricing-card:hover .checkout-pricing-frequency {
    opacity: 1;
}

.checkout-pricing-card:before, .checkout-pricing-card:after {
    position: absolute;
}

.checkout-pricing-card:before {
    content: '';
    z-index: 4;
    top: 40px;
    left: -37px;
    width: 220px;
    height: 30px;
    transform: rotate(-45deg);
    transform-origin: bottom left;
    background-color: #0db5ad;
    visibility: hidden;
    color: #FFFFFF;
}

.checkout-pricing-card:after {
    content: '';
    z-index: 5;
    top: 3px;
    left: 6px;
    width: 12px;
    height: 14px;
    background-image: url('../img/check.svg');
    background-repeat: no-repeat;
}

.checkout-pricing-card.selected {
    border-color: #0db5ad;
    box-shadow: none;
    transform: none;
}

.checkout-pricing-card.selected:before {
    visibility: visible;
    opacity: 1;
}

.checkout-pricing-card.selected .checkout-pricing-period, .checkout-pricing-card.selected .checkout-pricing-frequency {
    opacity: 1;
}

.checkout-pricing-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.checkout-pricing-card__info {
    display: flex;
    flex-direction: column;
}


.checkout-pricing-badge {
    display: inline-block;
    background: rgba(179, 215, 255, 0.15);
    color: #1A85FF;
    padding: 3px 6px;
    font-size: 9px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.checkout-pricing-period {
    font-size: 18px;
    font-weight: 600;
    color: #2B2B2B;
    line-height: 1;
    opacity: 0.8;
}

.checkout-pricing-amount {
    font-size: 18px;
    font-weight: 700;
    color: #2B2B2B;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.checkout-pricing-frequency {
    font-size: 14px;
    color: #767676;
    font-weight: 400;
    opacity: 0.8;
}

/* ===== CHECKBOX ===== */
.checkout-checkbox-wrapper {
    margin: 24px 0;
    position: relative;
}

.checkout-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 14px;
    color: #495057;
    cursor: pointer;
    line-height: 1.5;
}

.checkout-checkbox-wrapper__checkbox {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    top: 1px;
    position: relative;
}

.checkout-checkbox-wrapper__checkbox::before {
    position: absolute;
    top: 3px;
    left: 4px;
    display: block;
    width: 1rem;
    height: 1rem;
    pointer-events: none;
    border-radius: 4px;
    content: "";
    background-color: rgba(255, 255, 255, 0.8);
    border: #959595 solid 1px;
}

.checkout-checkbox-wrapper__checkbox::after {
    position: absolute;
    top: 50%;
    left: 56%;
    display: block;
    width: 9px;
    height: 9px;
    content: "";
    background: url(../img/checkbox-check.svg) no-repeat 50% 50%;
    transform-origin: center;
    transform: translate(-50%, -50%);
}

.checkout-checkbox-wrapper:has(.checkout-checkbox.uk-form-danger) .checkout-checkbox-wrapper__checkbox::before {
    border-color: #f0506e;
}

.checkout-checkbox-label:has(.checkout-checkbox:checked) .checkout-checkbox-wrapper__checkbox:before {
    border-color: #0db5ad;
    background-color: #0db5ad;
}

.checkout-checkbox {
    width: 16px;
    height: 16px;
    transition: all 0.2s ease;
    z-index: -1;
    opacity: 0;
}

.checkout-checkbox:checked {
    background: #0db5ad;
    border-color: #0db5ad;
}

.checkout-checkbox-text {
    font-size: 16px;
    font-weight: 400;
    color: #000;
}

.checkout-checkbox-link {
    color: #0db5ad;
    text-decoration: none;
    font-size: 16px;
}

.checkout-checkbox-link:hover {
    color: #086e69;
    text-decoration: underline;
}

/* ===== SUBMIT BUTTON ===== */
.checkout-submit-button {
    width: 100%;
    background: #0db5ad;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    padding: 16px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 10px 1px rgba(57, 57, 57, 0.1);
}

.checkout-submit-button:hover {
    transform: translateY(-1px);
    background-color: #0a8f89;
}

.checkout-submit-button:active {
    transform: translateY(0);
}

/* ===== SIDEBAR ===== */

.checkout-sidebar-card {
    margin-bottom: 40px;
    box-shadow: 0 2px 5px 0 rgba(163, 163, 163, 0.1);
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

.checkout-sidebar-card--desktop {
    display: block;
}

.checkout-sidebar-card--mobile {
    display: none;
}

@media (min-width: 769px) {
    .checkout-sidebar {
        max-width: 382px;
    }
}

@media (max-width: 768px) {
    .checkout-sidebar-card {
        box-shadow: none;
        padding: 0;
        margin-bottom: 25px;
    }

    .checkout-sidebar-card--desktop {
        display: none;
    }

    .checkout-sidebar-card--mobile {
        display: block;
        gap: 16px;
    }
}

@media (min-width: 569px) and (max-width: 768px) {
    .checkout-sidebar-card--mobile {
        display: flex;
    }
}

.checkout-sidebar-card__info {
    border-radius: 6px;
    box-shadow: 0 2px 5px 0 rgba(163, 163, 163, 0.1);
    display: flex;
    flex-direction: column;
}

.checkout-sidebar-card__inner {
    background-color: #fff;
    padding: 20px;
    @media (max-width: 768px) {
        flex: 1 1;
    }

}

.checkout-sidebar-card__inner p {
    margin-bottom: 0;
}

.checkout-product-image {
    width: 100%;
    height: auto;
    border-radius: 8px 8px 0 0;
    max-height: 382px;

    @media (min-width: 569px) and (max-width: 768px) {
        max-height: 224px;
        max-width: 240px;

    }
    @media (max-width: 568px) {
        max-height: unset;
    }
}

.checkout-product-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.2;
    color: #2B2B2B;
    margin: 0 0 8px 0;
}

.checkout-product-subtitle {
    font-size: 16px;
    font-weight: 400;
    color: #767676;
    margin: 0 0 16px 0;
}

.checkout-product-description {
    font-size: 12px;
    color: #767676;
    line-height: 1.5;
    margin-bottom: 20px;
    margin-top: 0;
}

.checkout-pricing-summary {
    padding: 20px 15px;
    background-color: rgb(249, 253, 255);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

@media (max-width: 768px) {
    .checkout-pricing-summary, .checkout-sidebar-card__inner {
        padding: 10px 13.33333px;
    }
}

.checkout-due-today {
    font-size: 16px;
    color: #0db5ad;
}

.checkout-due-amount {
    font-size: 28px;
    font-weight: 700;
    color: #0db5ad;
    line-height: 1.2;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.checkout-due-note {
    font-size: 10px;
    color: rgb(118, 118, 118);
    display: flex;
    align-items: center;
    padding-right: 8px;
}

.checkout-trial-dropdown {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    position: absolute;
    width: 100%;
    box-shadow: 0 2px 5px 0 rgba(57, 57, 57, 0.1);
    max-height: 330px;
    overflow: auto;
    max-width: 320px !important;
    transform: translateX(-50%);
    left: 50% !important;
    @media (min-width: 569px) and (max-width: 768px) {
        left: 59% !important;
        top: 56px !important;
    }
}

.checkout-trial-dropdown__item {
    display: flex;
    padding: 5px 15px;
    transition: background-color 0.2s ease;
    justify-content: space-between;
}

.checkout-trial-dropdown__item:hover {
    background-color: #f8f9fa;
}


/* ===== TRIAL INFO DROPDOWN ===== */
.checkout-trial-info-btn {
    background: none;
    border: none;
    font-size: 14px;
    color: #767676;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    font-family: inherit;
    text-decoration: underline;
    text-decoration-style: dotted;
    box-shadow: none;
    justify-content: flex-end;
    right: 13px !important;
}

.checkout-trial-info-btn:hover {
    color: #495057;
}

.checkout-trial-info-btn:hover svg {
    transform: rotate(180deg);
}

.checkout-trial-info-btn svg {
    height: 10px;
    width: 10px;
    opacity: 1;
}

.checkout-trial-info-btn svg path {
    fill: #767676;
}

.trial-end-date {
    font-size: 14px;
    font-weight: 400;
    color: rgb(118, 118, 118);
    line-height: 1;
}

.trial-plan-info-wrapper {
    display: flex;
    flex-direction: column;
    text-align: start;
}

.trial-plan-info {
    font-size: 10px;
    color: rgb(118, 118, 118);
    line-height: 1;
}

.trial-price-info {
    font-size: 14px;
    font-weight: 700;
    color: #000000;
}

/* ===== TESTIMONIALS ===== */
.checkout-testimonial {
    margin-bottom: 40px;
}

.checkout-testimonial:last-child {
    margin-bottom: 0;
}

.checkout-testimonial-quote {
    font-size: 16px;
    color: #000;
    line-height: 1.6;
    margin: 0 0 8px 0;
}

.checkout-testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.checkout-testimonial-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.checkout-testimonial-name {
    font-size: 14px;
    font-weight: bold;
    color: #000;
    margin: 0;
}

/* ===== FOOTER ===== */
.checkout-footer {
    padding: 48px 15px 24px;
    text-align: center;
}

.checkout-footer-text {
    font-size: 14px;
    font-weight: 600;
    color: #0db5ad;
    margin: 0;
}

.checkout-footer-link {
    color: #0db5ad;
    text-decoration: none;
    transition: all 0.2s ease;
}

.checkout-footer-link:hover {
    color: #086e69;
    text-decoration: underline;
}

/* ===== FORM VALIDATION ===== */
.checkout-form-validation-error {
    display: none;
    font-size: 12px;
    color: #dc3545;
    position: absolute;
    z-index: 10;
    top: 100%;
    right: 0;
    width: auto;
    margin-top: 0;
    padding-right: .375rem;
    opacity: 0;
    text-align: right;
    cursor: text;
    pointer-events: none;
    transition: all 0.2s;
}

.checkout-checkbox-wrapper .checkout-form-validation-error {
    right: auto;
    left: 5px;
    opacity: 1;
}

.checkout-input.error ~ .checkout-form-validation-error,
.checkout-input.uk-form-danger ~ .checkout-form-validation-error,
.checkout-checkbox-wrapper:has(.checkout-checkbox.uk-form-danger) ~ .checkout-form-validation-error {
    display: block;
    top: 36px;
    opacity: 1;
}

/* UIKit form validation styles */
.uk-form-success {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.uk-form-danger {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Checkbox validation styling */
.checkout-checkbox.uk-form-danger {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
    .checkout-main {
        padding: 30px 0 20px;
    }

    .checkout-container {
        padding: 0 16px;
    }

    .checkout-form-title {
        font-size: 22px;
        margin-bottom: 8px;
    }

    .checkout-form-section p {
        margin-top: 0;
        margin-bottom: 16px;
    }

    .checkout-form-styles {
        padding: 13.33333px;
        margin-bottom: 25px;
    }

    .checkout-input-group {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 13.33333px;
    }

    .checkout-floating-label {
        margin-bottom: 13.33333px;
    }

    .checkout-sidebar {
        margin-top: 25px;
    }

    .checkout-testimonial {
        margin-bottom: 25px;
    }

}

@media (max-width: 568px) {
    .checkout-header .uk-flex {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
    }

    .checkout-form-title {
        font-size: 20px;
    }

    .checkout-floating-label .checkout-label {
        padding: 0
    }
}