/* Crypto Payment Widget */
.cp-payment-widget,
.cp-payment-widget.cp-payment-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif !important;
    width: 420px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
    overflow: visible !important;
    position: relative !important;
}

/* Modal Overlay */
.cp-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.75) !important;
    z-index: 999999 !important;
    justify-content: center !important;
    align-items: center !important;
}

.cp-modal-overlay.active {
    display: flex !important;
}

/* Prevent clicks from closing modal */
.cp-modal-overlay * {
    pointer-events: auto !important;
}

.cp-widget-body {
    pointer-events: auto !important;
}

.cp-payment-widget *,
.cp-payment-widget *::before,
.cp-payment-widget *::after {
    box-sizing: border-box !important;
}

/* Button area */
.cp-button-area {
    text-align: center !important;
}

.cp-main-btn {
    cursor: pointer !important;
    font-weight: 600 !important;
    font-family: inherit !important;
    transition: all 0.3s ease !important;
    outline: none !important;
}

.cp-main-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3) !important;
}

/* Widget body */
.cp-widget-body,
.cp-widget-body.cp-widget-body {
    background: linear-gradient(145deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%) !important;
    border-radius: 20px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5) !important;
    overflow: hidden !important;
    color: #e0e0e0 !important;
    position: relative !important;
    width: 420px !important;
    max-width: 95vw !important;
    max-height: 90vh !important;
    padding: 0 !important;
    border: none !important;
    overflow-y: auto !important;
}

/* Close Button */
.cp-close-btn {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: none !important;
    color: #999 !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    font-size: 18px !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s !important;
    z-index: 10 !important;
}

.cp-close-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    color: #fff !important;
}

/* Exit Button */
.cp-exit-btn {
    width: 100% !important;
    padding: 14px !important;
    background: rgba(239, 68, 68, 0.2) !important;
    border: 2px solid rgba(239, 68, 68, 0.4) !important;
    border-radius: 10px !important;
    color: #ef4444 !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    margin-top: 12px !important;
}

.cp-exit-btn:hover {
    background: rgba(239, 68, 68, 0.3) !important;
}

.cp-widget-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #a855f7, #6366f1);
    background-size: 300% 100%;
    animation: cp-gradient-shift 3s ease infinite;
}

@keyframes cp-gradient-shift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Steps */
.cp-step {
    display: none !important;
    padding: 30px !important;
    width: 100% !important;
}

.cp-step.active {
    display: block !important;
}

/* Header */
.cp-header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

.cp-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #fff;
}

.cp-logo {
    width: 50px;
    height: 50px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.cp-logo svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.cp-back-btn {
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    color: #999;
    padding: 6px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.cp-back-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

/* Amount */
.cp-amount-display {
    text-align: center;
    margin-bottom: 20px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
}

.cp-amount-label {
    display: block;
    font-size: 12px;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cp-amount-value {
    font-size: 32px;
    font-weight: 700;
}

.cp-usd {
    color: #00d084;
}

/* Description */
.cp-description {
    background: rgba(99, 102, 241, 0.1);
    border-left: 3px solid #6366f1;
    padding: 12px 15px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 20px;
    font-size: 13px;
    line-height: 1.5;
    color: #aaa;
}

/* Wallet Options */
.cp-wallet-select {
    margin-bottom: 20px;
}

.cp-wallet-select > label {
    display: block;
    margin-bottom: 10px;
    font-size: 13px;
    color: #888;
}

.cp-wallet-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.cp-wallet-option {
    cursor: pointer;
    margin: 0;
}

.cp-wallet-option input[type="radio"] {
    display: none;
}

.cp-wallet-option-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    transition: all 0.2s;
}

.cp-wallet-option:hover .cp-wallet-option-inner {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.cp-wallet-option.selected .cp-wallet-option-inner,
.cp-wallet-option input:checked + .cp-wallet-option-inner {
    background: rgba(99, 102, 241, 0.15);
    border-color: #6366f1;
}

/* Crypto Icons */
.cp-crypto-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #fff;
    flex-shrink: 0;
}

.cp-icon-btc { background: linear-gradient(135deg, #f7931a, #ffb74d); }
.cp-icon-eth { background: linear-gradient(135deg, #627eea, #8c9eff); }
.cp-icon-usdt { background: linear-gradient(135deg, #26a17b, #4caf50); }
.cp-icon-usdc { background: linear-gradient(135deg, #2775ca, #42a5f5); }
.cp-icon-bnb { background: linear-gradient(135deg, #f3ba2f, #ffca28); }
.cp-icon-sol { background: linear-gradient(135deg, #9945ff, #14f195); }
.cp-icon-xrp { background: linear-gradient(135deg, #23292f, #666); }
.cp-icon-ada { background: linear-gradient(135deg, #0033ad, #3366ff); }
.cp-icon-doge { background: linear-gradient(135deg, #c2a633, #e6c35c); }
.cp-icon-trx { background: linear-gradient(135deg, #ff0013, #ff4444); }
.cp-icon-matic { background: linear-gradient(135deg, #8247e5, #a975ff); }
.cp-icon-ltc { background: linear-gradient(135deg, #345d9d, #5b8bd4); }
.cp-icon-avax { background: linear-gradient(135deg, #e84142, #ff6b6b); }
.cp-icon-dot { background: linear-gradient(135deg, #e6007a, #ff4da6); }
.cp-icon-ton { background: linear-gradient(135deg, #0098ea, #4dc9f6); }

.cp-wallet-option-info {
    flex: 1;
}

.cp-wallet-option-info strong {
    display: block;
    color: #fff;
    font-size: 14px;
}

.cp-wallet-option-info small {
    color: #777;
    font-size: 11px;
}

.cp-crypto-amount {
    font-size: 13px;
    color: #00d084;
    font-weight: 600;
    text-align: right;
    min-width: 80px;
}

/* Form */
.cp-form-group {
    margin-bottom: 16px;
}

.cp-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #888;
}

.cp-form-group input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.cp-form-group input:focus {
    outline: none;
    border-color: #6366f1;
}

.cp-form-group input::placeholder {
    color: #555;
}

/* Buttons */
.cp-btn {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s;
}

.cp-btn svg {
    width: 18px;
    height: 18px;
}

.cp-btn-primary {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: #fff;
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.cp-btn-primary:hover {
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.cp-btn-success {
    background: linear-gradient(135deg, #00d084, #00b377);
    color: #fff;
    box-shadow: 0 6px 20px rgba(0, 208, 132, 0.4);
}

.cp-btn-success:hover {
    box-shadow: 0 8px 25px rgba(0, 208, 132, 0.5);
}

.cp-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.cp-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Timer */
.cp-timer-section {
    text-align: center;
    margin-bottom: 24px;
}

.cp-timer-ring {
    width: 110px;
    height: 110px;
    margin: 0 auto 12px;
    position: relative;
}

.cp-timer-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.cp-timer-bg {
    fill: none;
    stroke: rgba(255, 255, 255, 0.1);
    stroke-width: 6;
}

.cp-timer-progress {
    fill: none;
    stroke: #6366f1;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-dasharray: 283;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear;
}

.cp-timer-display {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 26px;
    font-weight: 700;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.cp-timer-label {
    font-size: 12px;
    color: #777;
    margin: 0;
}

/* Payment Details */
.cp-payment-details {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
}

.cp-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

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

.cp-detail-label {
    color: #777;
    font-size: 12px;
}

.cp-detail-value {
    color: #fff;
    font-weight: 600;
    font-size: 13px;
}

.cp-usd-amount { color: #00d084; }
.cp-crypto-to-pay { color: #a855f7; font-size: 15px; }

/* Wallet Address */
.cp-wallet-address-section {
    margin-bottom: 20px;
}

.cp-wallet-address-section > label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    color: #888;
}

.cp-address-box {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 12px;
}

.cp-wallet-address-display {
    flex: 1;
    color: #00d084;
    font-size: 12px;
    word-break: break-all;
    line-height: 1.4;
}

.cp-copy-btn {
    background: rgba(99, 102, 241, 0.2);
    border: none;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.cp-copy-btn svg {
    width: 16px;
    height: 16px;
    color: #6366f1;
}

.cp-copy-btn:hover {
    background: rgba(99, 102, 241, 0.4);
}

.cp-qr-code {
    margin-top: 12px;
    text-align: center;
}

.cp-qr-code img {
    background: #fff;
    padding: 8px;
    border-radius: 8px;
}

/* Warning */
.cp-warning {
    display: flex;
    gap: 10px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 20px;
}

.cp-warning svg {
    width: 20px;
    height: 20px;
    color: #f59e0b;
    flex-shrink: 0;
}

.cp-warning p {
    margin: 0;
    font-size: 12px;
    color: #d4a373;
    line-height: 1.4;
}

/* Status */
.cp-status-section {
    text-align: center;
    padding: 20px 0;
}

.cp-status-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-status-icon svg {
    width: 36px;
    height: 36px;
}

.cp-status-pending {
    background: rgba(99, 102, 241, 0.2);
}

.cp-status-success {
    background: rgba(0, 208, 132, 0.2);
}

.cp-status-success svg {
    color: #00d084;
}

.cp-status-error {
    background: rgba(239, 68, 68, 0.2);
}

.cp-status-error svg {
    color: #ef4444;
}

.cp-status-title {
    color: #fff;
    font-size: 18px;
    margin: 0 0 8px;
}

.cp-status-message {
    color: #888;
    font-size: 13px;
    margin: 0 0 16px;
}

.cp-order-info {
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.cp-order-info span {
    display: block;
    color: #777;
    font-size: 11px;
    margin-bottom: 4px;
}

.cp-order-hash-display {
    color: #6366f1;
    font-size: 13px;
    word-break: break-all;
}

/* Expired */
.cp-expired-section {
    text-align: center;
    padding: 30px 20px;
}

.cp-expired-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 16px;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cp-expired-icon svg {
    width: 36px;
    height: 36px;
    color: #ef4444;
}

.cp-expired-section h3 {
    color: #fff;
    margin: 0 0 8px;
    font-size: 18px;
}

.cp-expired-section p {
    color: #888;
    margin: 0 0 16px;
    font-size: 13px;
}

/* Powered */
.cp-powered {
    text-align: center;
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cp-powered span {
    font-size: 10px;
    color: #444;
    letter-spacing: 1px;
}

/* Error */
.cp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 8px;
    text-align: center;
}

/* Confirmed Cash Icon */
.cp-status-confirmed {
    width: 70px !important;
    height: 70px !important;
    margin: 0 auto 16px !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
}

.cp-cash-icon {
    font-size: 40px !important;
}

.cp-reject-icon {
    font-size: 40px !important;
}

.cp-pending-icon {
    font-size: 40px !important;
}
