/* PROPH Swap Plugin Styles */

#proph-swap-container {
    max-width: 600px;
    margin: 40px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Wallet Section */
#wallet-section {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    color: white;
}

.wallet-info {
    margin-top: 15px;
}

.wallet-address, .wallet-network {
    margin: 8px 0;
    font-size: 14px;
}

#user-address {
    font-family: 'Courier New', monospace;
    font-size: 13px;
}

/* Buttons */
.proph-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.proph-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.proph-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.proph-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.max-btn {
    padding: 6px 12px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.max-btn:hover {
    background: #764ba2;
}

/* Swap Interface */
#swap-interface {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Tabs */
.swap-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    background: #f7f7f7;
    padding: 6px;
    border-radius: 12px;
}

.swap-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: #666;
}

.swap-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* Panels */
.swap-panel {
    display: none;
}

.swap-panel.active {
    display: block;
}

.swap-panel h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
    font-size: 22px;
}

/* Balance Info */
.balance-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.balance-item {
    display: flex;
    justify-content: space-between;
    margin: 8px 0;
    font-size: 14px;
}

.balance-item span {
    color: #666;
}

.balance-item strong {
    color: #333;
    font-weight: 600;
}

/* Input Groups */
.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.input-with-max {
    position: relative;
    display: flex;
    gap: 10px;
}

.input-group input {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Exchange Rate */
.exchange-rate {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 20px;
}

.rate-info {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 15px;
}

.rate-info span {
    color: #555;
}

.rate-info strong {
    color: #667eea;
    font-weight: 700;
    font-size: 16px;
}

/* Status Messages */
.status-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.status-message.info {
    background: #e3f2fd;
    color: #1976d2;
    display: block;
}

.status-message.success {
    background: #e8f5e9;
    color: #388e3c;
    display: block;
}

.status-message.warning {
    background: #fff3e0;
    color: #f57c00;
    display: block;
}

.status-message.error {
    background: #ffebee;
    color: #d32f2f;
    display: block;
}

/* Error Message */
.error-message {
    background: #ffebee;
    color: #d32f2f;
    padding: 16px;
    border-radius: 12px;
    margin-top: 20px;
    border-left: 4px solid #d32f2f;
}

/* Contract Info */
.contract-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 12px 0;
    font-size: 13px;
}

.info-item span {
    color: #666;
}

.info-item strong {
    color: #333;
    font-weight: 600;
}

.contract-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
}

.contract-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* Loading State */
.proph-btn.loading {
    position: relative;
    color: transparent;
}

.proph-btn.loading::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    top: 50%;
    left: 50%;
    margin-left: -10px;
    margin-top: -10px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spinner 0.8s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 768px) {
    #proph-swap-container {
        margin: 20px 15px;
    }

    #swap-interface {
        padding: 20px;
    }

    .swap-panel h3 {
        font-size: 20px;
    }

    .proph-btn {
        font-size: 15px;
        padding: 12px 20px;
    }
}
