/**
 * Crypto Donations for GiveWP - Styles
 */

/* Main Container */
.crypto-payment-container {
    margin: 20px 0;
    padding: 0;
    border: none !important;
}

/* Fix for Option-Based Form Editor */
.give-form fieldset.crypto-payment-container {
    border: none !important;
    padding: 0 !important;
    margin: 20px 0 !important;
}

.give-form .crypto-payment-container legend {
    display: none;
}

/* Currency Selector */
.crypto-currency-selector {
    margin: 20px 0;
    clear: both;
}

.crypto-label {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    margin-bottom: 10px;
}

.crypto-select {
    width: 100%;
    padding: 12px 15px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
}

.crypto-select:focus {
    outline: none;
    border-color: #2196F3;
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
}

.crypto-select:hover {
    border-color: #2196F3;
}

/* Payment Details Container */
.crypto-payment-details {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    display: none; /* Hidden by default */
    clear: both;
}

/* Show payment details when active */
.crypto-payment-details.active {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Fix for Option-Based Form Editor */
.give-form .crypto-payment-details {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* QR Code Wrapper */
.crypto-qr-wrapper {
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    max-width: 280px;
}

.crypto-qr-display {
    display: inline-block;
    margin: 0 auto;
}

.crypto-qr-display img,
.crypto-qr-wrapper img {
    display: inline-block;
    margin: 0 auto;
    border: 3px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 200px;
    height: auto;
}

/* Wallet Address Section */
.crypto-wallet-section,
.crypto-wallet-info {
    margin: 20px 0;
    clear: both;
}

.crypto-wallet-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

.crypto-wallet-display {
    margin: 10px 0;
}

.crypto-wallet-address {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    padding: 15px;
    margin: 10px 0;
    word-break: break-all;
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    text-align: center;
    color: #333;
    line-height: 1.6;
    display: block !important;
}

.crypto-wallet-address code {
    background: transparent !important;
    padding: 0 !important;
    color: #333 !important;
    font-size: 13px !important;
    border: none !important;
    word-break: break-all;
}

/* Copy Button */
.crypto-copy-btn {
    width: 100%;
    padding: 12px 20px;
    background: #2196F3;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.crypto-copy-btn:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3);
}

.crypto-copy-btn:active {
    background: #1565C0;
    transform: translateY(0);
}

/* Instructions */
.crypto-instructions {
    margin: 15px 0;
    padding: 15px;
    background: #e3f2fd;
    border-left: 4px solid #2196F3;
    border-radius: 4px;
}

.crypto-instructions h3,
.crypto-heading {
    margin: 0 0 10px 0 !important;
    padding: 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #0d47a1 !important;
}

.crypto-instructions p,
.crypto-currency-name {
    margin: 10px 0 !important;
    padding: 0 !important;
    color: #1565C0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
}

.crypto-instructions ol,
.crypto-steps {
    margin: 10px 0 10px 20px !important;
    padding: 0 !important;
    color: #1565C0 !important;
}

.crypto-instructions li {
    margin: 5px 0 !important;
    padding: 0 !important;
    color: #1565C0 !important;
    font-size: 14px !important;
}

.crypto-instructions strong {
    color: #0d47a1;
}

/* Note/Warning */
.crypto-note {
    margin: 15px 0;
    padding: 12px 15px;
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
}

.crypto-note p {
    margin: 0;
    color: #856404;
    font-size: 13px;
    line-height: 1.5;
}

.crypto-note small {
    font-size: 12px;
}

/* Security Icon */
.crypto-secure-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 15px 0;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

.crypto-secure-icon {
    font-size: 16px;
}

.crypto-secure-text {
    font-size: 13px;
    color: #666;
}

/* Error Message */
.crypto-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* Bitcoin Specific Styles */
.crypto-bitcoin-container {
    border-top: 3px solid #f7931a;
}

.crypto-bitcoin-qr {
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

/* Ethereum Specific Styles */
.crypto-ethereum-container {
    border-top: 3px solid #627eea;
}

.crypto-ethereum-qr {
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
}

/* GiveWP Form Compatibility */
.give-form .crypto-payment-container,
.give-form fieldset.crypto-payment-container,
#give-form .crypto-payment-container {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.give-form .crypto-select,
#give-form .crypto-select {
    width: 100% !important;
    max-width: 100% !important;
}

.give-form .crypto-payment-details,
#give-form .crypto-payment-details {
    width: 100% !important;
}

.give-form .crypto-payment-details.active,
#give-form .crypto-payment-details.active {
    display: block !important;
}

.give-form .crypto-qr-wrapper,
#give-form .crypto-qr-wrapper {
    display: block !important;
}

.give-form .crypto-wallet-info,
#give-form .crypto-wallet-info {
    display: block !important;
    width: 100% !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .crypto-qr-wrapper {
        padding: 15px;
        max-width: 100%;
    }

    .crypto-wallet-address {
        font-size: 11px;
        padding: 12px;
    }

    .crypto-copy-btn {
        font-size: 14px;
        padding: 10px 15px;
    }

    .crypto-instructions,
    .crypto-note {
        padding: 10px 12px;
        font-size: 13px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .crypto-qr-wrapper {
        background: #2a2a2a;
        border-color: #444;
    }
    
    .crypto-wallet-address {
        background: #1a1a1a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .crypto-wallet-address code {
        color: #e0e0e0;
    }
}

