/* NFT Modals Styles */

/* Common modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: var(--bg-secondary);
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    overflow-y: auto;
    border: none;
    box-shadow: none;
}



.modal.active {
    display: block;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.close-modal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;

}

.close-modal:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 20px;
}

/* NFT Details Modal */
#nft-details-modal {
    padding: 0;
    margin: 0;
}

#nft-details-modal .modal-content {
    background: rgba(20, 20, 30, 0.95);
    border: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
    border-radius: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Create Listing Modal */
.create-listing-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-input {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
}

.form-input:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-select {
    background: rgba(108, 99, 255, 0.1);
    border: 1px solid rgba(108, 99, 255, 0.2);
    color: var(--text-primary);
    padding: 12px;
    border-radius: 5px;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236c63ff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-select:focus {
    outline: none;
    border-color: #6c63ff;
    box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    margin-top: 20px;
}

.form-button {
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;
}

.form-button i {
    margin-right: 8px;
}

.form-button.primary {
    background: linear-gradient(135deg, #6c63ff 0%, #5a52e0 100%);
    color: white;
}

.form-button.primary:hover {
    background: linear-gradient(135deg, #5a52e0 0%, #4a43d0 100%);
    box-shadow: 0 5px 15px rgba(90, 82, 224, 0.3);
    transform: translateY(-2px);
}

.form-button.secondary {
    background: rgba(108, 99, 255, 0.1);
    color: #6c63ff;
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.form-button.secondary:hover {
    background: rgba(108, 99, 255, 0.2);
    border-color: rgba(108, 99, 255, 0.5);
}

/* NFT Preview in modal */
.nft-preview {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(108, 99, 255, 0.2);
}

.nft-preview-image {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(108, 99, 255, 0.3);
}

.nft-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.nft-preview-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.nft-preview-title {
    font-size: 1.2rem;
    margin: 0 0 5px 0;
    color: var(--text-primary);
}

.nft-preview-id {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.nft-preview-meta {
    display: flex;
    gap: 15px;
}

.nft-preview-meta-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.nft-preview-meta-item span {
    color: var(--text-primary);
    font-weight: 500;
}

/* Form info box */
.form-info-box {
    background: rgba(108, 99, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.form-info-box-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-info-box-title i {
    color: #6c63ff;
}

.form-info-box-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Fee calculation */
.fee-calculation {
    background: rgba(108, 99, 255, 0.05);
    border: 1px solid rgba(108, 99, 255, 0.1);
    border-radius: 8px;
    padding: 15px;
    margin-top: 20px;
}

.fee-calculation-title {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.fee-calculation-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.fee-calculation-item.total {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(108, 99, 255, 0.1);
    font-weight: 600;
    color: var(--text-primary);
}

/* Success and error messages */
.form-message {
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-message i {
    font-size: 1.2rem;
}

.form-message.success {
    background: rgba(46, 213, 115, 0.1);
    border: 1px solid rgba(46, 213, 115, 0.3);
    color: #2ed573;
}

.form-message.error {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.3);
    color: #ff4757;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .nft-preview {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .nft-preview-meta {
        justify-content: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
}
