/* ================================================================
   Thank You Page Shortcode — Frontend Styles
   Primary: #6C5DD3  Secondary: #D93025
   ================================================================ */

/* --- Reset & Base --- */
.tyq-page {
    max-width: 700px;
    margin: 0 auto;
    /*padding: 0px 20px 64px;*/  
    font-family: var(--tyq-font, 'Tajawal'), sans-serif;
    color: var(--tyq-text-dark, #333);
    line-height: 1.7;
    direction: rtl;
}

.tyq-error {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    color: #dc2626;
    font-family: var(--tyq-font, 'Tajawal'), sans-serif;
    text-align: center;
    font-size: 16px;
}

/* ===== SUCCESS HEADER ===== */
.tyq-header {
    text-align: center;
    margin-bottom: 32px;
    position: relative;
    animation: tyq-fade-up 0.6s ease both;
}

/* --- Confetti Dots --- */
.tyq-confetti {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 160px;
    height: 100px;
    pointer-events: none;
}

.tyq-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: tyq-float 2.5s ease-in-out infinite;
}

.tyq-dot-red    { background: #D93025; }
.tyq-dot-blue   { background: #1A73E8; }
.tyq-dot-purple { background: #6C5DD3; }

.tyq-dot:nth-child(1) { top: 18px; left: 5px;  animation-delay: 0s;    }
.tyq-dot:nth-child(2) { top: 8px;  right: 8px; animation-delay: 0.4s;  }
.tyq-dot:nth-child(3) { top: 40px; left: -2px; animation-delay: 0.8s;  }
.tyq-dot:nth-child(4) { top: 35px; right: -4px; animation-delay: 1.2s; }
.tyq-dot:nth-child(5) { top: 60px; left: 12px;  animation-delay: 0.6s; }
.tyq-dot:nth-child(6) { top: 58px; right: 10px; animation-delay: 1.0s; }
.tyq-dot:nth-child(7) { top: 25px; left: 30px;  animation-delay: 0.2s; }
.tyq-dot:nth-child(8) { top: 50px; right: 25px; animation-delay: 1.4s; }

@keyframes tyq-float {
    0%, 100% { transform: translateY(0); opacity: 0.8; }
    50%      { transform: translateY(-6px); opacity: 1;   }
}

.tyq-success-icon {
    position: relative;
    width: 88px;
    height: 88px;
    margin: 0 auto 24px;
}

.tyq-icon-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #E8E0FF;
    box-shadow: 0 4px 16px rgba(108,93,211,0.25);
}

.tyq-icon-inner {
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 4px 20px rgba(108,93,211,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: tyq-scale-pop 0.5s 0.2s cubic-bezier(0.34,1.56,0.64,1) both;
}

.tyq-icon-inner svg {
    width: 32px;
    height: 32px;
}

.tyq-icon-inner svg path {
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
    animation: tyq-draw 0.5s 0.6s ease forwards;
}

.tyq-heading {
    font-size: 32px;
    font-weight: 700;
    background: linear-gradient(90deg, #D93025, #6C5DD3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0 0 8px;
    letter-spacing: -0.3px;
}

.tyq-subheading {
    font-size: 18px;
    font-weight: 500;
    color: var(--tyq-text-dark, #333);
    margin: 0 0 6px;
}

.tyq-message {
    font-size: 14px;
    color: var(--tyq-text-muted, #666);
    margin: 0;
    max-width: 440px;
    margin-inline: auto;
}

/* ===== MAIN CARD ===== */
.tyq-card {
    background: var(--tyq-card-bg, #fff);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 6px 24px rgba(0,0,0,0.03);
    padding: 28px;
    margin-bottom: 28px;
    animation: tyq-fade-up 0.5s 0.2s ease both;
}

.tyq-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.tyq-section-header h2 {
    font-size: 17px;
    font-weight: 700;
    color: var(--tyq-primary, #6C5DD3);
    margin: 0;
}

.tyq-section-header svg {
    flex-shrink: 0;
}

/* --- Info Grid --- */
.tyq-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.tyq-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    padding: 14px 8px;
    border-radius: 12px;
    background: #fafafe;
}

.tyq-info-item svg {
    flex-shrink: 0;
}

.tyq-info-label {
    font-size: 12px;
    color: #060606;
    font-weight: 400;
}

.tyq-info-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--tyq-text-dark, #333);
}

.tyq-order-num {
    color: var(--tyq-secondary, #D93025);
    font-weight: 700;
    font-size: 15px;
}

.tyq-divider {
    height: 1px;
    background: #f0f0f5;
    margin: 24px 0;
}

/* --- Products --- */
.tyq-products {
    margin-bottom: 24px;
}

.tyq-product-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid #f5f5fa;
}

.tyq-product-row:last-child {
    border-bottom: none;
}

.tyq-product-img {
    width: 56px;
    height: 56px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f5f5fa;
}

.tyq-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tyq-product-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.tyq-product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tyq-text-dark, #333);
}

.tyq-product-variant {
    font-size: 12px;
    color: var(--tyq-text-muted, #666);
}

.tyq-product-qty {
    font-size: 13px;
    color: var(--tyq-text-muted, #666);
    font-weight: 500;
    flex-shrink: 0;
}

.tyq-product-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--tyq-secondary, #D93025);
    flex-shrink: 0;
    white-space: nowrap;
}

/* --- Order Summary --- */
.tyq-summary {
    background: var(--tyq-summary-bg, #F5F3FF);
    border-radius: 12px;
    padding: 20px 24px;
    margin-top: 4px;
}

.tyq-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    color: var(--tyq-text-dark, #333);
}

.tyq-summary-row .tyq-price {
    color: var(--tyq-secondary, #D93025);
    font-weight: 600;
}

.tyq-summary-row .tyq-shipping {
    color: var(--tyq-primary, #6C5DD3);
    font-weight: 600;
}

.tyq-summary-row .tyq-muted {
    color: var(--tyq-text-muted, #666);
}

.tyq-summary-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    margin-top: 8px;
    border-top: 1px solid rgba(108,93,211,0.15);
    font-size: 20px;
    font-weight: 700;
}

.tyq-summary-total span:last-child {
    color: var(--tyq-secondary, #D93025);
}

/* ===== ANIMATIONS ===== */
@keyframes tyq-fade-up {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes tyq-scale-pop {
    from { transform: scale(0.3); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

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

@keyframes tyq-ring-spin {
    to { transform: rotate(360deg); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
    .tyq-page {/* padding: 28px 16px 40px;  */}
    .tyq-heading { font-size: 26px; }
    .tyq-subheading { font-size: 16px; }
    .tyq-info-grid { grid-template-columns: 1fr; gap: 10px; }
    .tyq-info-item {
        flex-direction: row;
        text-align: start;
        gap: 10px;
        padding: 10px 14px;
    }
    .tyq-card { padding: 20px; }
    .tyq-product-row { flex-wrap: wrap; }
    .tyq-summary { padding: 16px 18px; }
    .tyq-summary-total { font-size: 17px; }
}
