/* Order Page Styles */
.order-page {
    min-height: 100vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem;
    padding-top: 3rem;
}

.order-card {
    background: #fff;
    border-radius: 20px;
    padding: 3rem 2.5rem;
    width: 100%;
    text-align: center;
    position: relative;
    animation: slideUp 0.5s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Card Badge */
.card-badge {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 700;
    margin: 0 auto 1.5rem;
}

.success .card-badge {
    background: #ecfdf5;
    color: #10b981;
}

.error .card-badge {
    background: #fef2f2;
    color: #ef4444;
}

/* Typography */
.order-card h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 0.5rem;
}

.card-subtitle {
    color: #64748b;
    margin: 0 0 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Order Meta Grid */
.order-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: #f1f5f9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.meta-item {
    background: #fff;
    padding: 1rem;
}

.meta-label {
    display: block;
    font-size: 0.75rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.meta-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.9rem;
    word-break: break-all;
}

/* Products List */
.products-list {
    text-align: left;
    margin-bottom: 1.5rem;
}

.products-list h3 {
    font-size: 0.85rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.75rem;
}

.product-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
}

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

.product-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-name {
    font-weight: 500;
    color: #1e293b;
}

.product-qty {
    background: #f1f5f9;
    padding: 0.125rem 0.5rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #64748b;
}

.product-price {
    font-weight: 600;
    color: #1e293b;
}

/* Email Box - Make it responsive */
.email-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
    flex-wrap: wrap;
}

.email-icon {
    width: 40px;
    height: 40px;
    background: #eff6ff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.email-content {
    flex: 1;
    min-width: 150px;
}

.email-content strong {
    display: block;
    font-size: 0.85rem;
    color: #1e293b;
    margin-bottom: 0.125rem;
}

.email-content span {
    font-size: 0.85rem;
    color: #64748b;
    word-break: break-word;
}

.print-invoice-link {
    margin-left: auto;
    padding: 0.5rem 1rem;
    background: #eff6ff;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .email-box {
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
    }

    .email-icon{
        display: none;
    }
    
    .email-content {
        text-align: center;
    }
    
    .print-invoice-link {
        margin-left: 0;
        text-align: center;
        white-space: normal;
    }
}


/* Buttons */
.action-btns {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.btn-primary {
    background: #6366f1;
    color: #fff;
}

.btn-primary:hover {
    background: #4f46e5;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-outline {
    background: #fff;
    color: #6366f1;
    border: 2px solid #e0e7ff;
}

.btn-outline:hover {
    background: #eef2ff;
    border-color: #6366f1;
}

/* Processing State */
.processing {
    padding: 4rem 2.5rem;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e2e8f0;
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.ref-badge {
    display: inline-block;
    background: #f1f5f9;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    color: #64748b;
    font-family: monospace;
    margin-top: 0.5rem;
}

.processing h1 {
    margin-bottom: 0.5rem;
}

.processing p {
    color: #64748b;
    margin: 0 0 1rem;
}

/* Error State */
.error h1 {
    color: #991b1b;
}

.error p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 14px 20px;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 380px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease, fadeOut 0.3s ease 4.7s forwards;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.success {
    background: #059669;
}

.toast.error {
    background: #dc2626;
}

.toast.info {
    background: #2563eb;
}

.toast.warning {
    background: #d97706;
}

.toast-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Copy License Button */
.copy-license-btn {
    transition: all 0.2s;
    border-radius: 4px;
    padding: 5px !important;
}

.copy-license-btn:hover {
    background-color: #f1f5f9;
}

.copy-license-btn:active {
    transform: scale(0.95);
}

.license-key-container {
    position: relative;
}

/* Responsive */
@media (max-width: 600px) {
    .order-page {
        padding: 1rem;
    }

    .order-card {
        padding: 2rem 1.5rem;
    }

    .order-meta {
        grid-template-columns: 1fr;
    }
}