/**
 * Frontend Styles
 * Crypto Payments for WooCommerce
 */

.cpw-payment-details {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 12px;
}

.cpw-amount-box {
    background: linear-gradient(135deg, #3655F6 0%, #5a7aff 100%);
    color: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cpw-amount-label {
    font-size: 14px;
    opacity: 0.9;
}

.cpw-amount-value {
    font-size: 20px;
    font-weight: 700;
}

.cpw-error-notice {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}

.cpw-network-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
}

.cpw-network-label {
    font-weight: 500;
    color: #374151;
}

.cpw-network-value {
    background: #e5e7eb;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
}

.cpw-address-box {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.cpw-address-box label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 10px;
}

.cpw-address-row {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

.cpw-address {
    flex: 1;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 12px;
    word-break: break-all;
    display: flex;
    align-items: center;
}

.cpw-copy-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: #3655F6;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
    white-space: nowrap;
}

.cpw-copy-btn:hover {
    background: #2a47d4;
}

.cpw-copy-btn.cpw-copied {
    background: #22c55e;
}

.cpw-copy-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* QR Section */
.cpw-qr-section {
    margin-bottom: 16px;
}

.cpw-show-qr-btn {
    width: 100%;
    padding: 12px;
    background: #fff;
    border: 2px dashed #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    transition: all 0.2s;
}

.cpw-show-qr-btn:hover {
    border-color: #3655F6;
    color: #3655F6;
    background: #f5f5ff;
}

/* QR Modal */
.cpw-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

.cpw-qr-content {
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    position: relative;
}

.cpw-qr-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #374151;
}

.cpw-qr-close:hover {
    background: #e5e7eb;
}

.cpw-qr-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 16px;
    border-radius: 8px;
}

.cpw-qr-content p {
    font-size: 11px;
    word-break: break-all;
    color: #6b7280;
    margin: 0;
    padding: 12px;
    background: #f3f4f6;
    border-radius: 6px;
}

/* Instructions */
.cpw-instructions {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #92400e;
}

.cpw-instructions p {
    margin: 0;
}

/* Confirm Box */
.cpw-confirm-box {
    background: #fff;
    padding: 16px;
    border-radius: 8px;
    border: 2px solid #e5e7eb;
}

.cpw-confirm-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.cpw-confirm-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin: 0;
    flex-shrink: 0;
    accent-color: #3655F6;
}

/* Checkout Icon */
.cpw-checkout-icon {
    display: inline-block;
    vertical-align: middle;
}

.cpw-checkout-network {
    display: inline-block;
    vertical-align: middle;
}

/* Mobile */
@media (max-width: 480px) {
    .cpw-address-row {
        flex-direction: column;
    }

    .cpw-copy-btn {
        width: 100%;
        justify-content: center;
    }

    .cpw-amount-box {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
}

/* Refresh Button */
.cpw-refresh-rate-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: inherit;
    padding: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
    line-height: 1;
}

.cpw-refresh-rate-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.cpw-refresh-rate-btn:disabled {
    opacity: 0.7;
    cursor: wait;
}

.cpw-amount-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cpw-amount-box .cpw-refresh-rate-btn {
    color: #fff;
}

.cpw-amount-box .cpw-refresh-rate-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cpw-refresh-rate-btn.cpw-loading .dashicons {
    animation: cpw-spin 1s linear infinite;
}

@keyframes cpw-spin {
    100% {
        transform: rotate(360deg);
    }
}

.cpw-btn-text {
    background: #fff;
    color: #991b1b;
    border: 1px solid #991b1b;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 10px;
}

.cpw-btn-text:hover {
    background: #fef2f2;
}

.cpw-error-notice {
    display: flex;
    justify-content: space-between;
    align-items: center;
}