/**
 * Frontend Styles for Crypto Payment Gateway
 * Adapted for Shamanic Secret Theme
 */

/* Payment Form */
.cpg-payment-form {
    margin: 15px 0;
    padding: 24px;
    background: #243029;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 12px;
}

/* Amount Display */
.cpg-amount-display {
    background: #1a2a1f;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

.cpg-amount-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.cpg-amount-row.cpg-usdt-amount {
    margin-top: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(201, 169, 98, 0.2);
}

.cpg-amount-row .cpg-label {
    font-weight: 600;
    color: #b8c4b8;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.cpg-amount-row .cpg-value {
    font-size: 18px;
    font-weight: 700;
    color: #c9a962;
}

.cpg-amount-row.cpg-usdt-amount .cpg-value {
    font-size: 22px;
    color: #c9a962;
}

.cpg-rate-info {
    margin-top: 10px;
    text-align: center;
    color: #8a9a8a;
    font-size: 13px;
}

/* Field Groups */
.cpg-field-group {
    margin-bottom: 20px;
}

.cpg-field-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f5f0e8;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.cpg-field-group label .required {
    color: #c9a962;
    font-weight: 700;
}

.cpg-field-group select,
.cpg-field-group input[type="text"],
.cpg-field-group input[type="file"] {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 8px;
    font-size: 14px;
    box-sizing: border-box;
    background: #1a2a1f;
    color: #f5f0e8;
    transition: all 0.3s ease;
}

.cpg-field-group select:focus,
.cpg-field-group input[type="text"]:focus {
    border-color: #c9a962;
    outline: none;
    box-shadow: 0 0 0 2px rgba(201, 169, 98, 0.2);
}

.cpg-field-group select option {
    background: #1a2a1f;
    color: #f5f0e8;
}

.cpg-field-group .description {
    margin-top: 8px;
    font-size: 13px;
    color: #8a9a8a;
    font-style: italic;
}

/* Wallet Address Display */
.cpg-wallet-address-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

.cpg-wallet-address {
    flex: 1;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    background: #1a2a1f;
    border: 1px solid rgba(201, 169, 98, 0.2);
    padding: 14px;
    border-radius: 8px;
    color: #f5f0e8;
    word-break: break-all;
}

.cpg-copy-btn {
    padding: 14px 24px;
    background: #c9a962;
    color: #1a2a1f;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    white-space: nowrap;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

.cpg-copy-btn:hover {
    background: #d4b872;
    transform: translateY(-1px);
}

.cpg-copy-btn.copied {
    background: #4a7c59;
    color: #f5f0e8;
}

/* QR Code Display */
.cpg-qr-container {
    text-align: center;
    margin: 24px 0;
    padding: 20px;
    background: #1a2a1f;
    border: 1px solid rgba(201, 169, 98, 0.2);
    border-radius: 12px;
}

.cpg-qr-container img {
    max-width: 250px;
    height: auto;
    border: 2px solid #c9a962;
    border-radius: 8px;
    padding: 12px;
    background: #fff;
}

.cpg-qr-caption {
    margin-top: 12px;
    font-weight: 600;
    color: #f5f0e8;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.05em;
}

/* Payment Proof Preview */
#cpg-proof-preview {
    margin-top: 12px;
    text-align: center;
}

#cpg-proof-preview-img {
    max-width: 200px;
    border: 2px solid rgba(201, 169, 98, 0.3);
    border-radius: 8px;
    padding: 8px;
    background: #1a2a1f;
}

/* Notice Boxes */
.cpg-notice {
    background: rgba(201, 169, 98, 0.1);
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 8px;
    padding: 16px 20px;
    margin-top: 20px;
    color: #c9a962;
}

.cpg-notice strong {
    display: block;
    margin-bottom: 8px;
    color: #f5f0e8;
}

.cpg-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    color: #ff6b6b;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 15px 0;
}

/* Thank You Page Payment Summary */
.cpg-payment-summary {
    margin: 30px 0;
    padding: 28px;
    background: #243029;
    border: 1px solid rgba(201, 169, 98, 0.3);
    border-radius: 12px;
}

.cpg-payment-summary h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #c9a962;
    font-size: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cpg-payment-summary table {
    width: 100%;
    margin: 15px 0;
    border-collapse: collapse;
}

.cpg-payment-summary table th,
.cpg-payment-summary table td {
    padding: 14px 0;
    text-align: left;
    border-bottom: 1px solid rgba(201, 169, 98, 0.15);
}

.cpg-payment-summary table th {
    font-weight: 600;
    color: #b8c4b8;
    width: 200px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.03em;
}

.cpg-payment-summary table td {
    color: #f5f0e8;
}

.cpg-payment-summary table td code {
    background: #1a2a1f;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    word-break: break-all;
    color: #c9a962;
    border: 1px solid rgba(201, 169, 98, 0.2);
}

.cpg-notice-box {
    background: rgba(74, 124, 89, 0.2);
    border: 1px solid rgba(74, 124, 89, 0.4);
    color: #a8d5ba;
    padding: 16px 20px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cpg-payment-form {
        padding: 16px;
    }

    .cpg-amount-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .cpg-wallet-address-container {
        flex-direction: column;
    }

    .cpg-copy-btn {
        width: 100%;
    }

    .cpg-payment-summary table th,
    .cpg-payment-summary table td {
        display: block;
        width: 100%;
    }

    .cpg-payment-summary table th {
        padding-bottom: 6px;
        border-bottom: none;
    }

    .cpg-payment-summary table td {
        padding-top: 0;
        padding-bottom: 16px;
    }

    .cpg-qr-container img {
        max-width: 200px;
    }
}

/* Loading State */
.cpg-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cpg-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(201, 169, 98, 0.2);
    border-top: 2px solid #c9a962;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* WooCommerce Integration */
.woocommerce-checkout .cpg-payment-form {
    background: transparent;
    border: none;
    padding: 0;
    margin: 20px 0 0 0;
}

/* Payment method description styling */
.payment_method_crypto_payment .payment_box {
    background: transparent !important;
    color: #b8c4b8 !important;
}

.payment_method_crypto_payment .payment_box p {
    color: #8a9a8a;
}
