/* ========================================
   CF7 Thank You Modal — Frontend Styles
   ======================================== */

/* Overlay */
.cf7tym-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.cf7tym-overlay.cf7tym-active {
    opacity: 1;
    visibility: visible;
}

.cf7tym-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Modal */
.cf7tym-modal {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    padding: 50px 40px 44px;
    box-shadow:
        0 25px 60px rgba(0, 0, 0, 0.15),
        0 8px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.cf7tym-overlay.cf7tym-active .cf7tym-modal {
    transform: scale(1) translateY(0);
}

/* Close button */
.cf7tym-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: #f5f5f5;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    transition: all 0.2s ease;
    padding: 0;
}

.cf7tym-close:hover {
    background: #eee;
    color: #333;
    transform: rotate(90deg);
}

/* Content */
.cf7tym-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

/* Logo */
.cf7tym-logo-wrap {
    margin-bottom: 12px;
}

.cf7tym-logo-wrap img {
    max-height: 50px;
    max-width: 220px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cf7tym-logo-wrap img[src=""],
.cf7tym-logo-wrap img:not([src]) {
    display: none;
}

/* Check icon animation */
.cf7tym-check-icon {
    margin-bottom: 10px;
}

.cf7tym-circle {
    stroke-dasharray: 190;
    stroke-dashoffset: 190;
}

.cf7tym-overlay.cf7tym-active .cf7tym-circle {
    animation: cf7tym-draw-circle 0.6s 0.3s ease forwards;
}

.cf7tym-checkmark {
    stroke-dasharray: 40;
    stroke-dashoffset: 40;
}

.cf7tym-overlay.cf7tym-active .cf7tym-checkmark {
    animation: cf7tym-draw-check 0.4s 0.7s ease forwards;
}

@keyframes cf7tym-draw-circle {
    to { stroke-dashoffset: 0; }
}

@keyframes cf7tym-draw-check {
    to { stroke-dashoffset: 0; }
}

/* Typography */
.cf7tym-heading {
    font-size: 28px;
    font-weight: 800;
    color: #2ecc71;
    margin: 8px 0 4px;
    letter-spacing: 1px;
    line-height: 1.2;
}

.cf7tym-subheading {
    font-size: 18px;
    font-weight: 500;
    color: #333;
    margin: 0 0 8px;
    line-height: 1.4;
}

.cf7tym-description {
    font-size: 15px;
    color: #777;
    margin: 0;
    line-height: 1.6;
    max-width: 380px;
}

/* Close animation */
.cf7tym-overlay.cf7tym-closing {
    opacity: 0;
}

.cf7tym-overlay.cf7tym-closing .cf7tym-modal {
    transform: scale(0.9) translateY(20px);
}

/* Responsive */
@media (max-width: 520px) {
    .cf7tym-modal {
        padding: 40px 28px 36px;
        border-radius: 16px;
    }

    .cf7tym-heading {
        font-size: 24px;
    }

    .cf7tym-subheading {
        font-size: 16px;
    }

    .cf7tym-description {
        font-size: 14px;
    }

    .cf7tym-check-icon svg {
        width: 52px;
        height: 52px;
    }
}
