/**
 * YG Thank You Widget - Styles
 *
 * @package YG_Advanced_Custom_Forms
 */

/* ===== Base & Container ===== */
.yg-thank-you-wrapper {
    font-family: 'Heebo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    direction: rtl;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.yg-thank-you-card {
    width: 100%;
    max-width: 640px;
    background: #ffffff;
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 
                0 10px 20px -5px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    position: relative;
    text-align: center;
    animation: ygCardSlideIn 0.6s ease-out;
}

@keyframes ygCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.yg-thank-you-accent {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 50%, #dc2626 100%);
}

.yg-thank-you-content {
    padding: 2.5rem 2rem;
}

/* ===== Success Icon ===== */
.yg-success-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-radius: 50%;
    margin-bottom: 1.5rem;
    animation: ygIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s both;
}

@keyframes ygIconPop {
    from {
        transform: scale(0);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.yg-success-icon {
    font-size: 50px;
    color: #22c55e;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yg-success-icon svg,
.yg-success-icon i {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yg-success-icon svg {
    fill: currentColor;
}

/* ===== Typography ===== */
.yg-thank-you-title {
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.yg-thank-you-description {
    font-size: 1.125rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 2rem;
}

.yg-thank-you-description p {
    margin: 0;
}

/* ===== Services Grid ===== */
.yg-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.yg-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.25rem 0.75rem;
    border-radius: 16px;
    border: 1px solid;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.yg-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -8px rgba(0, 0, 0, 0.1);
}

.yg-service-icon {
    font-size: 28px;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.yg-service-icon svg {
    width: 28px;
    height: 28px;
}

.yg-service-title {
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.3;
}

/* ===== Timer Section ===== */
.yg-thank-you-timer {
    background: #f8fafc;
    border-radius: 20px;
    padding: 1.5rem;
    margin-top: 1.5rem;
    border: 1px solid #e2e8f0;
}

.yg-timer-circle {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto 1rem;
}

.yg-timer-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.yg-timer-bg {
    fill: none;
    stroke: #e2e8f0;
    stroke-width: 6;
}

.yg-timer-progress {
    fill: none;
    stroke: #dc2626;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.yg-timer-count {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
}

.yg-timer-text {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0 0 0.75rem 0;
}

.yg-seconds-count {
    font-weight: 700;
    color: #0f172a;
}

.yg-back-button {
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border: none;
    color: #ffffff;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.35);
}

.yg-back-button:hover {
    background: linear-gradient(135deg, #b91c1c 0%, #dc2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.5);
}

.yg-back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 38, 38, 0.4);
}

/* ===== Footer ===== */
.yg-thank-you-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #f1f5f9;
    font-size: 0.75rem;
    color: #94a3b8;
    border-top: 1px solid #e2e8f0;
}

.yg-security-badge {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.yg-security-badge i {
    font-size: 0.875rem;
    color: #22c55e;
}

.yg-copyright {
    font-weight: 500;
}

/* ===== Responsive - Tablet ===== */
@media (max-width: 768px) {
    .yg-thank-you-wrapper {
        padding: 0.75rem;
        min-height: auto;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .yg-thank-you-card {
        border-radius: 20px;
    }

    .yg-thank-you-content {
        padding: 2rem 1.25rem;
    }

    .yg-thank-you-title {
        font-size: 1.625rem;
    }

    .yg-thank-you-description {
        font-size: 1rem;
    }

    .yg-success-icon-wrapper {
        width: 80px;
        height: 80px;
    }

    .yg-success-icon {
        font-size: 40px;
    }

    .yg-success-icon svg,
    .yg-success-icon i {
        width: 40px;
        height: 40px;
    }

    .yg-services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.625rem;
        margin: 1.5rem 0;
    }

    .yg-service-card {
        padding: 1rem 0.5rem;
        border-radius: 12px;
    }

    .yg-service-icon {
        font-size: 22px;
    }

    .yg-service-icon svg {
        width: 22px;
        height: 22px;
    }

    .yg-service-title {
        font-size: 0.75rem;
    }

    .yg-timer-circle {
        width: 75px;
        height: 75px;
    }

    .yg-timer-count {
        font-size: 1.25rem;
    }

    .yg-thank-you-footer {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        padding: 0.875rem 1rem;
    }
}

/* ===== Responsive - Mobile Small ===== */
@media (max-width: 480px) {
    .yg-thank-you-content {
        padding: 1.5rem 1rem;
    }

    .yg-thank-you-title {
        font-size: 1.375rem;
    }

    .yg-thank-you-description {
        font-size: 0.9375rem;
    }

    .yg-services-grid {
        gap: 0.5rem;
    }

    .yg-service-card {
        padding: 0.875rem 0.375rem;
        border-radius: 10px;
    }

    .yg-service-icon {
        font-size: 20px;
        margin-bottom: 0.375rem;
    }

    .yg-service-icon svg {
        width: 20px;
        height: 20px;
    }

    .yg-service-title {
        font-size: 0.6875rem;
        font-weight: 600;
    }

    .yg-thank-you-timer {
        padding: 1.25rem 1rem;
    }

    .yg-timer-text {
        font-size: 0.875rem;
    }

    .yg-back-button {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
}

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    .yg-thank-you-card,
    .yg-success-icon-wrapper,
    .yg-service-card,
    .yg-timer-progress {
        animation: none;
        transition: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .yg-thank-you-card {
        border: 2px solid #0f172a;
    }

    .yg-service-card {
        border-width: 2px;
    }
}
