/**
 * Wallet styles for Chad Battles
 */

/* Wallet card */
.wallet-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wallet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.wallet-card-header {
    padding: 15px 20px;
    background: linear-gradient(135deg, #6e45e2 0%, #88d3ce 100%);
    color: white;
    font-weight: bold;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.wallet-card-body {
    padding: 20px;
    background-color: #fff;
}

/* Wallet info */
.wallet-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.wallet-address-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.wallet-address {
    font-family: monospace;
    font-size: 14px;
    color: #495057;
    flex-grow: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.copy-address-btn {
    background-color: transparent;
    border: none;
    color: #6e45e2;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}

.copy-address-btn:hover {
    color: #5a36c9;
}

.wallet-balance-container {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #f8f9fa;
    padding: 10px 15px;
    border-radius: 5px;
    border: 1px solid #e9ecef;
}

.wallet-balance {
    font-size: 18px;
    font-weight: bold;
    color: #212529;
}

.wallet-type-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-right: 10px;
}

/* Wallet actions */
.wallet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.wallet-btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.wallet-btn:hover {
    transform: translateY(-2px);
}

.wallet-btn-primary {
    background-color: #6e45e2;
    color: white;
    border: none;
}

.wallet-btn-primary:hover {
    background-color: #5a36c9;
}

.wallet-btn-secondary {
    background-color: #f8f9fa;
    color: #495057;
    border: 1px solid #ced4da;
}

.wallet-btn-secondary:hover {
    background-color: #e9ecef;
}

.wallet-btn-danger {
    background-color: #dc3545;
    color: white;
    border: none;
}

.wallet-btn-danger:hover {
    background-color: #c82333;
}

/* Wallet options */
.wallet-options {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wallet-option {
    border: 1px solid #444;
    border-radius: 8px;
    transition: all 0.2s ease;
    background-color: #2a2a3a;
    cursor: pointer;
}

.wallet-option:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border-color: #8050ff;
}

.wallet-option img {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.wallet-option h4 {
    margin-bottom: 10px;
    color: #212529;
}

.wallet-option p {
    color: #6c757d;
    font-size: 14px;
}

/* Wallet modal */
.wallet-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.wallet-modal-content {
    background-color: #fff;
    margin: 15% auto;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    position: relative;
    text-align: center;
}

.wallet-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.wallet-modal-close:hover {
    color: #555;
}

.wallet-modal-spinner {
    margin: 20px auto;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #6e45e2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.wallet-modal-message {
    margin-top: 20px;
    font-size: 16px;
    color: #495057;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: white;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.toast.show {
    opacity: 1;
}

/* NFT section */
.nft-section {
    margin-top: 30px;
}

.nft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.nft-card {
    background-color: #2a2a3a;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.2s ease;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.nft-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.nft-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.nft-info {
    padding: 10px;
    text-align: center;
}

.nft-card-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 10px;
    color: #212529;
}

.nft-card-text {
    color: #6c757d;
    margin-bottom: 15px;
}

.nft-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.nft-card-badge {
    display: inline-block;
    padding: 5px 10px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

/* Demo mode */
.demo-mode {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px dashed #ced4da;
}

.demo-mode h3 {
    margin-bottom: 15px;
    color: #495057;
}

.demo-mode-form {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.demo-mode-form input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #ced4da;
    border-radius: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wallet-options {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .nft-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }

    .wallet-modal-content {
        margin: 30% auto;
        padding: 20px;
    }
}

/* Wallet Icon Styles */
.wallet-icon-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto;
    color: white;
}

.wallet-icon-sm {
    display: inline-block;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    position: relative;
}

.wallet-icon-sm::before {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 16px;
}

.wallet-icon-container.phantom,
.wallet-icon-sm.phantom {
    background: linear-gradient(135deg, #ab9ff2, #5a32e6);
}

.wallet-icon-sm.phantom::before {
    content: "\f6e2"; /* ghost icon */
}

.wallet-icon-container.solflare,
.wallet-icon-sm.solflare {
    background: linear-gradient(135deg, #ffaa22, #ff4a1c);
}

.wallet-icon-sm.solflare::before {
    content: "\f185"; /* sun icon */
}

.wallet-icon-container.slope,
.wallet-icon-sm.slope {
    background: linear-gradient(135deg, #3cba54, #1a73e8);
}

.wallet-icon-sm.slope::before {
    content: "\f201"; /* chart line icon */
}

.wallet-icon-container.magiceden,
.wallet-icon-sm.magiceden {
    background: linear-gradient(135deg, #f953c6, #b91d73);
}

.wallet-icon-sm.magiceden::before {
    content: "\f7f7"; /* hat wizard icon */
}

/**
 * Wallet connection CSS styles
 */

/* Wallet logo styling */
.wallet-logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

/* Fallback icon if image isn't available */
.wallet-logo-fallback {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

/* Connection status popup */
.wallet-status-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.wallet-status-popup.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Connected wallet badge styling */
.connected-wallet-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(90deg, #6f42c1 0%, #d63384 100%);
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.connected-wallet-badge i {
    margin-right: 5px;
}

/* Wallet address display */
.wallet-address {
    font-family: 'Courier New', monospace;
    background-color: #222;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .wallet-option {
        padding: 10px 5px;
    }

    .wallet-logo {
        width: 40px;
        height: 40px;
    }
}

/* Wallet CSS for Chad Battles */

.wallet-container {
    background-color: #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.wallet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #333;
}

.wallet-balance {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5468ff;
}

.chadcoin-icon {
    width: 24px;
    height: 24px;
    margin-right: 8px;
}

.wallet-options {
    display: flex;
    gap: 10px;
}

.wallet-button {
    background-color: #2a2a2a;
    color: #e1e1e1;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-button:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.wallet-button.primary {
    background-color: #5468ff;
    color: white;
}

.wallet-button.primary:hover {
    background-color: #4254d9;
}

.wallet-section {
    margin-bottom: 30px;
}

.wallet-section-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #333;
}

.wallet-transaction-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wallet-transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #2a2a2a;
    transition: background-color 0.2s;
}

.wallet-transaction-item:hover {
    background-color: #2a2a2a;
}

.wallet-transaction-info {
    flex: 1;
}

.wallet-transaction-title {
    font-weight: 500;
    margin-bottom: 4px;
    color: #e1e1e1;
}

.wallet-transaction-date {
    font-size: 0.8rem;
    color: #999;
}

.wallet-transaction-amount {
    font-weight: 700;
}

.wallet-transaction-amount.positive {
    color: #28a745;
}

.wallet-transaction-amount.negative {
    color: #dc3545;
}

.wallet-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.wallet-modal.active {
    opacity: 1;
    visibility: visible;
}

.wallet-modal-content {
    background-color: #1a1a1a;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.wallet-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background-color: #1a1a1a;
}

.wallet-modal-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    color: #e1e1e1;
}

.wallet-modal-close {
    background: none;
    border: none;
    color: #999;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.wallet-modal-close:hover {
    color: #e1e1e1;
}

.wallet-connect-list {
    list-style: none;
    padding: 0;
    margin: 0;
    padding: 20px;
}

.wallet-connect-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 6px;
    background-color: #2a2a2a;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-connect-item:hover {
    background-color: #333;
    transform: translateY(-2px);
}

.wallet-connect-icon {
    width: 32px;
    height: 32px;
    margin-right: 15px;
}

.wallet-connect-name {
    flex: 1;
    font-weight: 500;
    color: #e1e1e1;
}

.wallet-connect-status {
    color: #999;
    font-size: 0.8rem;
    margin-left: 10px;
}

.wallet-form-group {
    margin-bottom: 20px;
}

.wallet-form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #e1e1e1;
    font-size: 0.9rem;
}

.wallet-form-input {
    width: 100%;
    padding: 10px 12px;
    background-color: #2a2a2a;
    border: 1px solid #333;
    border-radius: 4px;
    color: #e1e1e1;
    font-size: 0.9rem;
}

.wallet-form-input:focus {
    outline: none;
    border-color: #5468ff;
}

.wallet-form-submit {
    background-color: #5468ff;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.wallet-form-submit:hover {
    background-color: #4254d9;
}

.wallet-form-note {
    font-size: 0.8rem;
    color: #999;
    margin-top: 8px;
    font-style: italic;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .wallet-connect-list {
        padding: 15px;
    }

    .wallet-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-options {
        margin-top: 10px;
    }

    .wallet-balance {
        font-size: 1.5rem;
    }
}

/**
 * Wallet Management Styling for Chad Battles
 */

/* Wallet Connection Status */
.wallet-connected-info,
.wallet-not-connected {
    padding: 1rem;
    border-radius: 0.5rem;
}

.wallet-details {
    margin-top: 1.5rem;
}

.wallet-detail-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

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

.detail-label {
    font-weight: bold;
    min-width: 100px;
}

.detail-value {
    flex-grow: 1;
    font-family: monospace;
    margin-right: 0.5rem;
}

/* Chadcoin Balance Display */
.chadcoin-balance {
    text-align: center;
    padding: 1.5rem 0;
}

.balance-amount {
    font-size: 3rem;
    font-weight: 700;
    color: #f3b20e;
    text-shadow: 0 0 5px rgba(243, 178, 14, 0.3);
}

.balance-label {
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #888;
}

.balance-info {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* Wallet Connection Options */
.wallet-connection-options {
    text-align: center;
    padding: 1.5rem 0;
}

.wallet-connect-cta {
    margin: 2rem 0;
}

.wallet-features {
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.wallet-features ul {
    list-style-type: none;
    padding-left: 0;
}

.wallet-features li {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.wallet-features li:before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
}

/* Mintable Assets Display */
.asset-card {
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid rgba(0, 0, 0, 0.125);
}

.asset-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Notification Container */
#notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

/* Copy Address Button */
.copy-address {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Transaction Table */
.table-responsive {
    overflow-x: auto;
}

.table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Status badges */
.badge {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.35em 0.65em;
}
