/* Fintatech TASX Popup Styles */
.fintatech-tasx-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 10, 0.7);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fintatech-tasx-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.fintatech-tasx-popup {
    background: #ffffff;
    border-radius: 16px;
    padding: 32px;
    max-width: 650px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 10, 0.3);
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.fintatech-tasx-popup.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

/* Close Button */
.tasx-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #000000;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10;
}

.tasx-popup-close:hover {
    background: #212121;
    transform: scale(1.1);
}

.tasx-popup-close svg {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* Steps */
.tasx-popup-step {
    display: none;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s ease-in-out;
}

.tasx-popup-step.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Step 1 - Form */
.tasx-step1-form {
    width: 100%;
}

.tasx-step1-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.tasx-step1-text {
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 30px;
}

.tasx-step1-form .wpcf7 {
    width: 100%;
}

.tasx-step1-form .wpcf7-form {
    width: 100%;
}

/* Step 2 - Confirmation */
.tasx-step2-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.tasx-step2-image {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.tasx-step2-title {
    font-size: 24px;
    font-weight: 700;
    color: #212529;
    margin-bottom: 10px;
}

.tasx-step2-text {
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 30px;
}

.tasx-step2-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 300px;
}

.tasx-step2-book {
    background: #3755BE;
    color: #ffffff;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.tasx-step2-book:hover {
    background: #2e48a0;
    color: #ffffff !important;
    transform: translateY(-2px);
}

.tasx-step2-skip {
    background: transparent;
    color: #495057;
    border: none;
    padding: 12px 24px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
}

.tasx-step2-skip:hover {
    color: #000000;
}

/* Step 3 - Thank You */
.tasx-step3-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.tasx-step3-image {
    width: 100%;
    height: auto;
    margin-bottom: 20px;
}

.tasx-step3-text {
    font-size: 16px;
    color: #495057;
    line-height: 1.5;
    margin-bottom: 30px;
}

.tasx-step3-close {
    background: #3755BE;
    color: #ffffff;
    border: none;
    padding: 12px 40px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tasx-step3-close:hover {
    background: #2e48a0;
    transform: translateY(-2px);
}

/* Body lock when popup is open */
body.tasx-popup-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .fintatech-tasx-popup {
        padding: 30px 20px;
        width: 95%;
        margin: 20px;
    }
    .tasx-step1-title,
    .tasx-step2-title {
        font-size: 20px;
    }
    .tasx-step1-text,
    .tasx-step2-text,
    .tasx-step3-text {
        font-size: 14px;
    }

    .tasx-step2-buttons {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .fintatech-tasx-popup {
        padding: 25px 15px;
    }
}


/* Стилі для чекбокса згоди в CF7 формах - для всіх форм */
.wpcf7-acceptance .wpcf7-list-item {
    margin: 0;
    padding: 0;
}

.wpcf7-acceptance .wpcf7-list-item label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.tasx-step1-form .wpcf7-acceptance .wpcf7-list-item label {
    color: #495057;
}

.wpcf7-acceptance input[type="checkbox"] {
    margin: 2px 0 0 0;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

.wpcf7-acceptance .wpcf7-list-item-label {
    font-size: 14px;
    line-height: 1.4;
}

.tasx-step1-form .wpcf7-acceptance .wpcf7-list-item-label {
    color: #495057;
}

.wpcf7-acceptance a {
    color: #3755BE;
    text-decoration: none;
    transition: color 0.2s ease;
}

.wpcf7-acceptance a:hover {
    color: #2e48a0;
    text-decoration: underline;
}

/* Видаляємо зайвий пустий label */
.wpcf7-acceptance label label {
    display: none;
}

/* Кастомний вигляд чекбокса */
.wpcf7-acceptance .wpcf7-list-item-label {
    position: relative;
    padding-left: 28px; /* Збільшено для більшого чекбокса */
}

.wpcf7-acceptance .wpcf7-list-item-label:before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 20px;
    height: 20px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    transition: all 0.2s ease;
}

.wpcf7-acceptance input[type="checkbox"]:checked ~ .wpcf7-list-item-label:before {
    background: #3755BE;
    border-color: #3755BE;
}

.wpcf7-acceptance .wpcf7-list-item-label:after {
    content: '✓';
    position: absolute;
    left: 5px;
    top: 2px;
    font-size: 14px;
    color: white;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wpcf7-acceptance input[type="checkbox"]:checked ~ .wpcf7-list-item-label:after {
    opacity: 1;
}

.wpcf7-acceptance input[type="checkbox"]:focus ~ .wpcf7-list-item-label:before {
    border-color: #3755BE;
    box-shadow: 0 0 0 2px rgba(55, 85, 190, 0.2);
}

/* Приховуємо стандартний чекбокс для кастомного дизайну */
.wpcf7-acceptance input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 20px; /* Збільшено відповідно до кастомного */
    height: 20px; /* Збільшено відповідно до кастомного */
    cursor: pointer;
}

/* Адаптивність */
@media (max-width: 480px) {
    .wpcf7-acceptance .wpcf7-list-item-label {
        font-size: 13px;
        line-height: 1.3;
        padding-left: 24px; /* Трохи менше на мобільних */
    }

    .wpcf7-acceptance .wpcf7-list-item-label:before {
        width: 18px; /* Трохи менше на мобільних */
        height: 18px; /* Трохи менше на мобільних */
        top: 0;
    }

    .wpcf7-acceptance .wpcf7-list-item-label:after {
        left: 4px; /* Відцентровано для мобільних */
        top: 1px; /* Відцентровано для мобільних */
        font-size: 12px; /* Трохи менше на мобільних */
    }
}