/* ============================================================
   1. ASTRA CONTAINER FIX (ONLY FOR SUCCESS PAGE)
   - Page ID: 22079  (Payment Successful page)
   ============================================================ */

body.page-id-22079 {
    background: #f3f4f6;
}

/* Remove extra padding/borders Astra adds around the article */
body.page-id-22079 .site-content,
body.page-id-22079 .ast-container,
body.page-id-22079 .content-area,
body.page-id-22079 .site-main {
    margin: 0;
    padding: 0;
    background: transparent;
}

body.page-id-22079 .ast-article-single {
    margin: 0;
    padding: 40px 0;
    border: none;
    box-shadow: none;
    background: transparent;
}

/* Hide default WP page title “Payment Successful” */
body.page-id-22079 .entry-header {
    display: none;
}

/* Remove inner content padding */
body.page-id-22079 .entry-content {
    margin: 0;
    padding: 0;
}

/* ============================================================
   2. SUCCESS PAGE LAYOUT
   ============================================================ */

.cm-success-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 1rem 3rem;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.cm-success-wrapper * {
    box-sizing: border-box;
    font-family: inherit;
}

.cm-success-container {
    width: 100%;
    max-width: 500px;
}

/* ============================================================
   HEADER
   ============================================================ */

.cm-success-header {
    text-align: center;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 16px;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(16, 185, 129, 0.3);
}

.cm-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
}

.cm-success-icon svg {
    width: 40px;
    height: 40px;
    color: #ffffff;
}

.cm-success-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.cm-success-header p {
    font-size: 1rem;
    opacity: 0.95;
    margin: 0;
}

/* ============================================================
   ORDER SUMMARY CARD
   ============================================================ */

.cm-order-summary {
    margin-bottom: 1.5rem;
}

.cm-summary-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.06);
    border: 1px solid #e5e7eb;
}

.cm-summary-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #111827;
}

.cm-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cm-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
}

.cm-detail-item:last-child {
    border-bottom: none;
}

.cm-detail-item span:first-child {
    color: #6b7280;
    font-size: 0.875rem;
}

.cm-detail-item strong {
    color: #111827;
    font-weight: 600;
    font-size: 0.95rem;
}

.cm-price {
    color: #059669;
    font-weight: 700;
}

/* ============================================================
   STATUS BADGE
   ============================================================ */

.cm-status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Use your PHP status values as classes: completed / paid / processing / pending */

.cm-status-badge.completed {
    background: #d1fae5;
    color: #065f46;
}

.cm-status-badge.paid,
.cm-status-badge.processing {
    background: #fef3c7;
    color: #92400e;
}

.cm-status-badge.pending {
    background: #e5e7eb;
    color: #374151;
}

/* ============================================================
   STATUS MESSAGES
   ============================================================ */

.cm-status-message {
    margin-bottom: 1.5rem;
}

.cm-status-complete,
.cm-status-processing {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.cm-status-complete {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.cm-status-processing {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.cm-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #059669;
    animation: cm-pulse 2s infinite;
}

.cm-status-dot.processing {
    background: #d97706;
    animation-duration: 1.4s;
}

@keyframes cm-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.1); }
}

/* ============================================================
   NEXT STEPS
   ============================================================ */

.cm-next-steps {
    margin-bottom: 2rem;
}

.cm-next-steps h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 1rem;
    color: #111827;
}

.cm-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cm-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 3px solid #3b82f6;
}

.cm-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #3b82f6;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.cm-step-text {
    font-size: 0.875rem;
    color: #4b5563;
}

/* ============================================================
   BUTTONS
   ============================================================ */

.cm-success-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.cm-btn-whatsapp,
.cm-btn-home {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    font-size: 0.875rem;
    color: #ffffff;
}

.cm-btn-whatsapp {
    background: #25d366;
}

.cm-btn-whatsapp:hover {
    background: #128c7e;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.cm-btn-home {
    background: #6b7280;
}

.cm-btn-home:hover {
    background: #4b5563;
    transform: translateY(-1px);
}

/* ============================================================
   SUPPORT INFO
   ============================================================ */

.cm-support-info {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.cm-support-info p {
    color: #6b7280;
    font-size: 0.875rem;
    margin: 0;
}

.cm-support-info a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
}

.cm-support-info a:hover {
    text-decoration: underline;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
    body.page-id-22079 .ast-article-single {
        padding: 24px 0;
    }

    .cm-success-wrapper {
        padding: 0 0.75rem 2rem;
    }

    .cm-success-header {
        padding: 1.5rem 1rem;
    }

    .cm-success-icon {
        width: 60px;
        height: 60px;
    }

    .cm-success-icon svg {
        width: 30px;
        height: 30px;
    }

    .cm-success-header h1 {
        font-size: 1.5rem;
    }

    .cm-summary-card {
        padding: 1.25rem;
    }

    .cm-detail-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}
