/* ============================================
   Telegram Checkout Button Styles
   ============================================ */

.telegram-checkout-wrapper {
    margin: 20px 0;
    text-align: center;
}

.telegram-checkout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: #0088cc; /* Telegram blue */
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 12px 35px;
    font-size: 16px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 136, 204, 0.3);
    text-decoration: none;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.telegram-checkout-btn:hover {
    background: #006699;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 136, 204, 0.4);
    color: #fff;
}

.telegram-checkout-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 136, 204, 0.3);
}

.telegram-checkout-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 136, 204, 0.5);
}

/* Icon menggunakan pseudo-element (opsional) */
.telegram-checkout-btn::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 0 0-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.08-.03.26-.03.26z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    margin-right: 8px;
    transition: transform 0.3s ease;
}

.telegram-checkout-btn:hover::before {
    transform: scale(1.1);
}

/* Versi dengan loading state */
.telegram-checkout-btn.loading {
    opacity: 0.7;
    cursor: wait;
    pointer-events: none;
}

.telegram-checkout-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: telegram-spin 0.8s linear infinite;
    margin-left: 8px;
}

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

/* Responsif untuk mobile */
@media (max-width: 768px) {
    .telegram-checkout-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 14px;
    }
    
    .telegram-checkout-btn::before {
        width: 18px;
        height: 18px;
    }
}

/* Jika tombol ditempatkan di samping tombol place order */
.woocommerce-checkout .telegram-checkout-wrapper {
    margin-top: 15px;
    border-top: 1px solid #e0e0e0;
    padding-top: 20px;
}

/* Gaya untuk divider "atau checkout melalui" */
.telegram-checkout-divider {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    color: #666;
    font-size: 14px;
}

.telegram-checkout-divider::before,
.telegram-checkout-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #ddd, transparent);
}