/* UNIVERSAL P2P MARKETPLACE STYLES */
/* Enhanced styling for any-token P2P marketplace */

.p2p-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(10px);
}

.p2p-modal {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid #4a9eff;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(74, 158, 255, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.p2p-modal-header {
    background: linear-gradient(90deg, #4a9eff, #00d4ff);
    color: white;
    padding: 20px;
    border-radius: 18px 18px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.p2p-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.p2p-close {
    font-size: 2rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.p2p-close:hover {
    transform: scale(1.2);
}

.p2p-modal-content {
    padding: 30px;
    color: white;
}

/* Token Selection Grid */
.token-selection-section h3 {
    color: #4a9eff;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.token-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.token-card {
    background: linear-gradient(135deg, #252544 0%, #2a2a4a 100%);
    border: 2px solid #404060;
    border-radius: 15px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.token-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(74, 158, 255, 0.2), transparent);
    transition: left 0.5s;
}

.token-card:hover::before {
    left: 100%;
}

.token-card:hover {
    border-color: #4a9eff;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(74, 158, 255, 0.3);
}

.token-card.selected {
    border-color: #00ff88;
    background: linear-gradient(135deg, #1a4d3a 0%, #2d6a4f 100%);
    transform: scale(1.05);
}

.token-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.token-symbol {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4a9eff;
    margin-bottom: 5px;
}

.token-name {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 10px;
}

.available-validators {
    font-size: 0.8rem;
    color: #4a9eff;
    background: rgba(74, 158, 255, 0.1);
    padding: 5px 10px;
    border-radius: 10px;
}

/* Amount Section */
.amount-section {
    margin-bottom: 30px;
}

.input-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.input-group label {
    color: #4a9eff;
    font-weight: bold;
    min-width: 120px;
}

.input-group input, .input-group select {
    background: rgba(74, 158, 255, 0.1);
    border: 2px solid #404060;
    border-radius: 10px;
    padding: 12px;
    color: white;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.input-group input:focus, .input-group select:focus {
    outline: none;
    border-color: #4a9eff;
}

.estimated-crypto {
    background: linear-gradient(135deg, #1a3d1a 0%, #2d5a2d 100%);
    border: 2px solid #00ff88;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    font-size: 1.2rem;
    color: #00ff88;
    font-weight: bold;
}

.price-note {
    font-size: 0.9rem;
    color: #888;
    font-weight: normal;
}

/* Payment Methods */
.payment-methods-section h3 {
    color: #4a9eff;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.payment-methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-bottom: 30px;
}

.payment-method {
    background: rgba(74, 158, 255, 0.1);
    border: 2px solid #404060;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.payment-method:hover {
    border-color: #4a9eff;
    background: rgba(74, 158, 255, 0.2);
}

.payment-method.selected {
    border-color: #00ff88;
    background: rgba(0, 255, 136, 0.2);
}

.method-icon {
    font-size: 1.5rem;
}

.method-name {
    font-weight: bold;
    color: white;
}

.method-region {
    font-size: 0.8rem;
    color: #888;
}

/* Location Section */
.location-section h3 {
    color: #4a9eff;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.location-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 10px;
    margin-bottom: 15px;
}

.location-inputs input {
    background: rgba(74, 158, 255, 0.1);
    border: 2px solid #404060;
    border-radius: 10px;
    padding: 12px;
    color: white;
    transition: border-color 0.3s;
}

.location-inputs input:focus {
    outline: none;
    border-color: #4a9eff;
}

.detect-btn {
    background: linear-gradient(90deg, #4a9eff, #00d4ff);
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.detect-btn:hover {
    transform: scale(1.05);
}

/* Fee Section */
.fee-section {
    margin-bottom: 30px;
}

.fee-section label {
    color: #4a9eff;
    font-weight: bold;
    display: block;
    margin-bottom: 10px;
}

#maxFee {
    width: 100%;
    margin-bottom: 15px;
}

#feeDisplay {
    color: #00ff88;
    font-weight: bold;
    font-size: 1.2rem;
}

.fee-comparison {
    display: flex;
    justify-content: space-between;
    background: rgba(74, 158, 255, 0.1);
    border-radius: 10px;
    padding: 15px;
    margin-top: 10px;
}

.traditional {
    color: #ff6b6b;
}

.p2p {
    color: #00ff88;
}

.savings {
    color: #4a9eff;
    font-weight: bold;
}

/* Validator Preview */
.validator-preview h3 {
    color: #4a9eff;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

#validatorPreview {
    background: rgba(74, 158, 255, 0.1);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    color: #888;
    margin-bottom: 30px;
}

/* Post Request Button */
.post-request-btn {
    width: 100%;
    background: linear-gradient(90deg, #00ff88, #00d4ff);
    border: none;
    border-radius: 15px;
    padding: 20px;
    color: white;
    font-size: 1.3rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(0, 255, 136, 0.3);
}

.post-request-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(0, 255, 136, 0.4);
}

.post-request-btn:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .p2p-modal {
        width: 95%;
        margin: 20px;
    }
    
    .token-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-methods-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .location-inputs {
        grid-template-columns: 1fr;
    }
    
    .fee-comparison {
        flex-direction: column;
        gap: 10px;
    }
}
